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

SFSafariViewController (SwiftUI) #768

Closed
5 tasks done
vorisarik opened this issue May 10, 2023 · 2 comments
Closed
5 tasks done

SFSafariViewController (SwiftUI) #768

vorisarik opened this issue May 10, 2023 · 2 comments
Labels
feature request A feature has been asked for or suggested by the community

Comments

@vorisarik
Copy link

vorisarik commented May 10, 2023

Checklist

  • I have looked into the Readme, Examples, and FAQ and have not found a suitable solution or answer.
  • I have looked into the API documentation and have not found a suitable solution or answer.
  • I have searched the issues and have not found a suitable solution or answer.
  • I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • I agree to the terms within the Auth0 Code of Conduct.

Describe the problem you'd like to have solved

Hi, Widcket, guys,
unfortunately, Auth0 forum could not help me with explanation of SFSafariViewController usage in SwiftUI and suggested I ask here for the answer.
There is one totally clear thing in the FAQ:

Auth0
    .webAuth()
    .provider(WebAuthentication.safariProvider()) // Use SFSafariViewController
    .start { result in
        // ...
    }

and one unclear:

SomeView()
    .onOpenURL { url in
        WebAuthentication.resume(with: url)
    }

Would you please provide a little bit more information or a code example?
I couldn't figure out where in my code to do resume() und what URL should I pass on? Allowed callback URL from the application page? An example would be great!
Thanks in advance.

Describe the ideal solution

Explanation or code example.

Alternatives and current workarounds

No response

Additional context

No response

@vorisarik vorisarik added the feature request A feature has been asked for or suggested by the community label May 10, 2023
@vorisarik
Copy link
Author

Ok, resolved.
Custom URL scheme must be configured.
"In Xcode, go to the Info tab of your app target settings. In the URL Types section, click the + button to add a new entry. There, enter auth0 into the Identifier field and $(PRODUCT_BUNDLE_IDENTIFIER) into the URL Schemes field."

@Widcket
Copy link
Contributor

Widcket commented Jun 2, 2023

Hi @vorisarik, apologies for the delay. I'm glad you could solve this one.

@Widcket Widcket closed this as completed Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request A feature has been asked for or suggested by the community
Projects
None yet
Development

No branches or pull requests

2 participants