Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Extension framework firebase example #1090

Draft
wants to merge 1 commit into
base: feature/extension-dashboard-tile
Choose a base branch
from

Conversation

bryans99
Copy link
Collaborator

@bryans99 bryans99 commented Jun 4, 2022

And integration with Looker google workspace auth.

Extension framework SDK updated to get google access token and to allow
scopes to be reauthorized if necessary.

And integration with Looker google workspace auth.

Extension framework SDK updated to get google access token and to allow
scopes to be reauthorized if necessary.
@github-actions
Copy link
Contributor

github-actions bot commented Jun 4, 2022

Typescript Tests

0 files   -     7  0 suites   - 85   0s ⏱️ - 4m 49s
0 tests  - 198  0 ✔️  - 194  0 💤  -   4  0 ❌ ±0 
0 runs   - 675  0 ✔️  - 659  0 💤  - 16  0 ❌ ±0 

Results for commit cb53e1b. ± Comparison against base commit 66e7013.

This pull request removes 198 tests.
AccessToken defaults with empty token ‑ AccessToken defaults with empty token
AccessToken has a 10 second lag time for expiration ‑ AccessToken has a 10 second lag time for expiration
AccessToken is active with full token ‑ AccessToken is active with full token
ApiMethods full path with auth is just full path ‑ ApiMethods full path with auth is just full path
ApiMethods full path without auth is just full path ‑ ApiMethods full path without auth is just full path
ApiMethods path not prefixed if base url not set ‑ ApiMethods path not prefixed if base url not set
ApiMethods relative path with auth is api path ‑ ApiMethods relative path with auth is api path
ApiMethods relative path without auth is just base ‑ ApiMethods relative path without auth is just base
Browser session authenticate causes authentication ‑ Browser session authenticate causes authentication
Browser session getToken is mocked ‑ Browser session getToken is mocked
…

Copy link
Contributor

@jkaster jkaster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got some README questions but looks good otherwise

@@ -0,0 +1,94 @@
# Looker Extension Firestore Demo (React & Typescript)

TODO - add firebase setup
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this a draft PR?


TODO - add firebase setup

This repository demonstrate using firestore in a Looker extension using Typescript.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This repository demonstrate using firestore in a Looker extension using Typescript.
This repository demonstrates using firestore in a Looker extension using Typescript.

}
```

4. Create a `model` LookML file in your project. The name doesn't matter but the convention is to name it the same as the project— in this case, helloworld-js.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
4. Create a `model` LookML file in your project. The name doesn't matter but the convention is to name it the same as the project— in this case, helloworld-js.
4. Create a `model` LookML file in your project. The name doesn't matter but the convention is to name it the same as the project — in this case, helloworld-js.


- Add a connection in this model.
- [Configure the model you created](https://docs.looker.com/data-modeling/getting-started/create-projects#configuring_a_model) so that it has access to the selected connection.
We do this because Looker permissions data access via models— In order to grant / limit access to an extension, it must be associated with a model.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what to do with the grammar here.

* SOFTWARE.
*/
export const AnimalsList = () => {
const firestore = useFirestore()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, nice

const configure = async () => {
try {
const config =
(await extensionSDK.userAttributeGetItem('firebase_config')) || ''
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this user attribute associated with the extension?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. You needs a config object for firebase apps that contains an api key. One option is to use env variables but then you tied to one application. The other option is user attribute. The config allows you load the application but you need a google credential to access the data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants