Skip to content

Conversation

@punamdahiya
Copy link
Collaborator

@punamdahiya punamdahiya commented Nov 4, 2025

Test step to use MLPA proxy server without API key

  1. Set FxA server as stage by setting pref identity.fxaccounts.autoconfig.uri as https://accounts.stage.mozaws.net
  2. Set pref browser.smartwindow.requireSignIn as true .
  3. Set Smart Window endpoint as https://mlpa-dev.llm-proxy.nonprod.dataservices.mozgcp.net/v1/ and model as mistral-small-2503 and leave key pref empty
  4. Click Switch to Smart Window and complete authentication flow. Please note your production FxA account will not work (though you can use same email address) and need to create an account on stage.
  5. If prompted for API key , you can enter any text and continue

Noticed 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'

@punamdahiya punamdahiya changed the title Update entrypoint and scope to aimode in FxA auth flow Update entrypoint and service to aimode in FxA auth flow Nov 5, 2025
@punamdahiya punamdahiya force-pushed the smart-window-fxa branch 3 times, most recently from cb731d7 to be6eaac Compare November 5, 2025 23:46
Copy link

@mhammond mhammond left a 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,
Copy link

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 :)

Copy link
Collaborator Author

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

@punamdahiya punamdahiya force-pushed the smart-window-fxa branch 2 times, most recently from ec1ec37 to 1405c94 Compare November 12, 2025 20:16
Updated with OpenAI pipeline changes from D271303

Point to stage FxA server
{
type: "FXA_SMART_WINDOW_SIGNIN_FLOW",
data: {
entrypoint: "aimode",
Copy link
Collaborator

@LZoog LZoog Dec 4, 2025

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.

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.

4 participants