-
Notifications
You must be signed in to change notification settings - Fork 0
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
ENG-2960 Read ssoProvider from config host, not p0-prod #135
Conversation
Reads the ssoProvider for login from the host specified in the config, instead of defaulting to p0-prod.
publicDoc(`orgs/${args.org}`) | ||
); | ||
await saveConfig(args.org); | ||
await initializeFirebase(); |
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.
I don't follow why we need to add initializeFirebase
here/. Wasn't it already initialized if we were able to read the doc before?
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.
There are two Firebase, the bootstrap one (which is configured to point to p0-prod) and the regular one, which uses whatever is specified in the config.
export async function saveConfig(orgId: string) { | ||
const orgDoc = await getDoc<RawOrgData, object>( | ||
bootstrapDoc(`orgs/${orgId}`) | ||
); |
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.
Should there be the null check if (!orgData) throw
here as well?
We wouldn't want to write the config if there was no org found I assume
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.
It's there on line 33. We use the bootstrap config if no config was found.
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.
lgtm!
Reads the ssoProvider for login from the host specified in the config, instead of defaulting to p0-prod.