Skip to content
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

ASWebAuthenticationSession Support #226

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

sampaxk
Copy link

@sampaxk sampaxk commented Jan 17, 2023

Switched the authentication method from SafariURLHandler to ASWebAuthenticationURLHandler.
Implemented ASWebAuthenticationPresentationContextProviding in the OAuth2ClientPlugin class.

// if the user touches "done" in safari without entering the credentials the USER_CANCELLED error is sent #71
urlHandler.delegate = self.oauth2SafariDelegate
let urlHandler = ASWebAuthenticationURLHandler(
callbackUrlScheme: redirectUrl.replacingOccurrences(of: "://oauth", with: ""),
Copy link

@narcis-ro narcis-ro Mar 15, 2023

Choose a reason for hiding this comment

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

Should this be?

callbackUrlScheme: URL(string: redirectUrl)!.scheme!,

So it works with any host url? e.g ://auth

Copy link
Author

Choose a reason for hiding this comment

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

Yes, it should be as you've written. I've not tested it with other host urls but it should with any url.

@NoobleMcScrunchkin
Copy link

This PR looks like its gone a little bit quiet. I would love to see this one brought up to date and completed.

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.

3 participants