Skip to content

feat(oauth,docs): wip VPN in mobile support + ADRs for recent oauth decisions#20389

Draft
LZoog wants to merge 1 commit intomainfrom
FXA-12939
Draft

feat(oauth,docs): wip VPN in mobile support + ADRs for recent oauth decisions#20389
LZoog wants to merge 1 commit intomainfrom
FXA-12939

Conversation

@LZoog
Copy link
Copy Markdown
Contributor

@LZoog LZoog commented Apr 16, 2026

I've been working with Mark on FXA-12939 and we came to an agreement on what we've got proposed here in ADR 0049. This WIP branch needs some edits if we'll implement that here too.

For 0048, I'm recording decisions already decided on in a previous doc linked, because they relate to 0049 and they weren't captured in an ADR.

@LZoog LZoog force-pushed the FXA-12939 branch 11 times, most recently from 88f1aba to 40c93ae Compare April 18, 2026 00:10
- **Option I: Use the session token with full scopes via `fxa-credentials` grant**: Reuse the existing custom grant type, passing a session token and the complete desired scope set with `access_type=offline` to obtain a new refresh token. This is already implemented in application-services (`create_refresh_token_using_session_token`). The client would then revoke the old refresh token and manage the device record.
- **Option II: RFC 8693 token exchange with full desired scope set**: Use the standard token exchange grant type, passing the existing refresh token and the complete desired scope set per RFC 8693 semantics
- **Option III: RFC 8693 token exchange with additional scopes only**: Use the standard token exchange grant type, passing the existing refresh token and only the new scopes needed; the server unions them with the original token's scopes
- **Option IV: Authorization code exchange with broader scopes**: Use the session token to silently obtain an authorization code with the full desired scope set (`authorize_code_using_session_token` in application-services), then exchange the code for a new refresh token (`create_refresh_token_using_authorization_code`). This is a two-step flow but does not require a browser redirect — both calls are server-to-server.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

For reviewers of this PR / these ADRs: in the original authorization doc, we didn't list option IV. Mark noted this as an option late last last week when he saw these functions on the Rust side, and I wanted to add it here to consider. While technically feasible, we think the right approach is probably still the token exchange endpoint.

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.

1 participant