-
Notifications
You must be signed in to change notification settings - Fork 0
Update entrypoint and service to aimode in FxA auth flow #62
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
base: smart-window
Are you sure you want to change the base?
Conversation
580710a to
9fa1bda
Compare
cb731d7 to
be6eaac
Compare
mhammond
left a comment
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 looks pretty-much exactly like I'd expect for a signed in user 👍
| const fxAccounts = getFxAccountsSingleton(); | ||
| const token = await fxAccounts.getOAuthToken({ | ||
| scope: SCOPE_PROFILE, | ||
| client_id: OAUTH_CLIENT_ID, |
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 think you want a custom scope here, eg, "aimode" (probably as a const but I don't hate literals :) I think profile is likely to work, depending on how it is validated, but a specific scope is more correct. Even though the fxa api doesn't reflect this and should, this is a standard oauth "access token" and not really fxa specific (thinking towards enterprise etc :)
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.
Testing with scope as aimode not yet supported and fails to give a valid token
ec1ec37 to
1405c94
Compare
Updated with OpenAI pipeline changes from D271303 Point to stage FxA server
1405c94 to
078047b
Compare
| { | ||
| type: "FXA_SMART_WINDOW_SIGNIN_FLOW", | ||
| data: { | ||
| entrypoint: "aimode", |
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.
Probably makes sense to update this to aiwindow in this PR, the entrypoint I believe is still TBD but the service has been updated on the FxA side to look for the service=aiwindow query param.
Test step to use MLPA proxy server without API key
identity.fxaccounts.autoconfig.uriashttps://accounts.stage.mozaws.netbrowser.smartwindow.requireSignInas true .endpointas https://mlpa-dev.llm-proxy.nonprod.dataservices.mozgcp.net/v1/ andmodelasmistral-small-2503and leave key pref emptyNoticed below edge case sometime
6. After successful authentication on staging server user is not redirected to Smart window and lands on account settings web page. If that happens restart build and try again to authenticate by clicking on 'Switch to Smart Window'