-
Notifications
You must be signed in to change notification settings - Fork 196
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
base: feature/extension-dashboard-tile
Are you sure you want to change the base?
feat: Extension framework firebase example #1090
Conversation
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.
Typescript Tests0 files - 7 0 suites - 85 0s ⏱️ - 4m 49s Results for commit cb53e1b. ± Comparison against base commit 66e7013. This pull request removes 198 tests.
|
There was a problem hiding this 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 |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
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() |
There was a problem hiding this comment.
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')) || '' |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
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.