Skip to content

Authenticator: Support Multiple OAuthUserConfigurations #930

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

Open
wants to merge 5 commits into
base: v.next
Choose a base branch
from

Conversation

eri9000
Copy link
Collaborator

@eri9000 eri9000 commented Jul 9, 2025

Related to issue: #https://devtopia.esri.com/runtime/kotlin/issues/5297

Summary of changes:

  • Adds a list of OAuthUserConfigurations to AuthenticatorState
  • deprecates single OAuthUserConfiguration property
  • Adds test testMultipleOAuthUserConfigurations

Pre-merge Checklist

@eri9000 eri9000 changed the base branch from main to v.next July 9, 2025 00:02
@eri9000 eri9000 marked this pull request as ready for review July 9, 2025 02:24
@eri9000 eri9000 changed the title Erick/support oauthuserconfig list Authenticator: Support Multiple OAuthUserConfigurations Jul 9, 2025
@eri9000 eri9000 self-assigned this Jul 9, 2025
Copy link
Collaborator

@puneet-pdx puneet-pdx left a comment

Choose a reason for hiding this comment

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

@eri9000 looks ok overall. Some minor comments

return if (oAuthUserConfiguration?.canBeUsedForUrl(challenge.requestUrl) == true) {
val oAuthUserCredential = oAuthUserConfiguration.handleOAuthChallenge { _pendingOAuthUserSignIn.value = it }
.also {
// At this point we have suspended until the OAuth workflow is complete, so
Copy link
Collaborator

Choose a reason for hiding this comment

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

is it not worth preserving this comment ?

@@ -46,7 +46,7 @@ internal fun OAuthAuthenticator(
authenticatorState: AuthenticatorState,
onPendingOAuthUserSignIn: ((OAuthUserSignIn) -> Unit)?,
) {
if (authenticatorState.oAuthUserConfiguration?.redirectUrl == DEFAULT_REDIRECT_URI) {
if (oAuthPendingSignIn.oAuthUserConfiguration.redirectUrl == DEFAULT_REDIRECT_URI) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

can you explain this change?

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.

2 participants