Skip to content

Conversation

@nonth
Copy link

@nonth nonth commented Oct 30, 2025

Summary

Adds extraParams parameter to the Swift SDK's sign-in flow. This enables developers to pass custom query parameters to the OIDC authorization endpoint.

Testing

  • successfully append extraParams to query string parameters

Checklist

  • unit tests
  • necessary Swift comments

@nonth nonth requested a review from gao-sun as a code owner October 30, 2025 09:18
@simeng-li simeng-li requested a review from Copilot October 31, 2025 01:58
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for passing additional parameters to the authorization endpoint during sign-in. The feature allows developers to pass extra query parameters (e.g., tenant_id, ui_locales) that will be appended to the authorization URL.

Key changes:

  • Added extraParams parameter to generateSignInUri function in LogtoCore
  • Propagated extraParams through LogtoAuthSession and LogtoClient
  • Added public API method for sign-in with extra parameters

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
Sources/Logto/Core/LogtoCore+Generate.swift Added extraParams parameter to generateSignInUri and appends them to the query string
Sources/LogtoClient/LogtoAuthSession/LogtoAuthSession.swift Added extraParams property and passes it to generateSignInUri
Sources/LogtoClient/LogtoClient/LogtoClient+SignIn.swift Added extraParams parameter to internal method and new public API method
Tests/LogtoTests/LogtoCoreTests+Generate.swift Added test case verifying extra parameters are correctly added to the URI
Tests/LogtoClientTests/LogtoClient/LogtoClientTests+SignIn.swift Added mock and test case to verify extra parameters are passed through correctly

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Change extraParams parameter from optional to required in
signInWithBrowser method to ensure explicit parameter passing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant