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

Using Authorize from SwiftUI view #17

Open
infinitetrooper opened this issue Dec 4, 2020 · 3 comments
Open

Using Authorize from SwiftUI view #17

infinitetrooper opened this issue Dec 4, 2020 · 3 comments

Comments

@infinitetrooper
Copy link

Hello, Firstly, Thanks @elsesiy for the brilliant work.

Secondly, Is there any way to call the GAppAuth.shared.authorize from a SwiftUI view, The current implementation requires us to pass a UIViewController for presentingViewController but, I'm building an app in SwiftUI and would love to handle the auth without adding an extra view controller just for a login button.

Also, any plans to release a new version to support the updated GTMAppAuth and AppAuth releases?

Thanks Again!

@elsesiy
Copy link
Owner

elsesiy commented Dec 10, 2020

@infinitetrooper Thank you for reaching out! I understand the inconvenience and would love to support SwiftUI natively. Unfortunately I'm not up-to-date with the latest Apple developments anymore and don't think I'll find the time to dig into that very soon. Feel free to submit a PR!
I can look into updating the dependencies which should be quick (I hope)

@infinitetrooper
Copy link
Author

Thanks @elsesiy, I will definitely look to create a PR for SwiftUI if I end up figuring out how to implement the same functionality as is currently supported. Will keep an eye out for dependencies update.

@Tony1324
Copy link

Tony1324 commented Apr 19, 2021

Secondly, Is there any way to call the GAppAuth.shared.authorize from a SwiftUI view, The current implementation requires us to pass a UIViewController for presentingViewController but, I'm building an app in SwiftUI and would love to handle the auth without adding an extra view controller just for a login button.

I'm not familiar with UIkit so how would you do it with the adding an extra UI view controller way? I'm trying to make a multiplatform app for iOS and macOS so do I make separate things for UIViewController and NSViewController?

I am thinking off showing a sheet that has a sign in with google button

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

No branches or pull requests

3 participants