Open bdlukaa opened 3 years ago
@bdlukaa Thanks for your support brother. I plan on adding more OAuth 2.0 providers down the line but right now I'm super busy with real life issues; that's why I made it as easy as possible to add a new OAuth provider to the lib. I really wanted to launch with Twitter but they don't use OAuth 2.0 on their user API (they're still on OAuth 1.0). If you have some free time, feel free to open a PR with a new OAuth provider. I'll be implementing Apple next.
As for the platform, I only intended for this to work on mobile. I might consider supporting other platforms in the future but not right now.
I can help with the implementation for web and windows.
@bdlukaa That would be great.
@bdlukaa any update on web support? Thanks!
This is by far the best oauth package I have tried, really wish it will support flutter web. I have tried replaced the webview with easywebview, but get stuck at x-frame-option deny issue, sad.
@jasonlaw I haven't used flutter for the web but you shouldn't need a webview since it's already running in a browser. At the moment, I'm working on visa 2.0 that will include updates to support flutter 2, Apple auth, as well as other platforms. I can look into support for flutter web after but I think it should be easier because you're already in a browser. The idea is:
My main concern with the web implementation is, we'll have to figure out a way to integrate it into the lib without rewriting existing code or at least minimizing repetition
This can be solved by using the federated plugin style.
@jasonlaw I haven't used flutter for the web but you shouldn't need a webview since it's already running in a browser. At the moment, I'm working on visa 2.0 that will include updates to support flutter 2, Apple auth, as well as other platforms. I can look into support for flutter web after but I think it should be easier because you're already in a browser. The idea is:
- Build the oauth url based on user input (client id, scope, etc)
- Open the url in a browser window/tab
- Listen for changes to the browser's url till you find the redirect url
- Get the results out of the redirect url. My main concern with the web implementation is, we'll have to figure out a way to integrate it into the lib without rewriting existing code or at least minimizing repetition.
Simplicity is the beauty of this wonderful package, and I wish the implementation part (application, not lib) will be seamlessly between mobile and and web. In that case, I really wish the library itself will support for web. Anyway, I will first try out the your suggestion, and migrate the code when the library is ready for web support. Thank you again, really appreciate it.
After many reading and attempts, it seems there is no easy way to catch the redirect url from the browser. I am no expert in flutter, hence I have to give up the web option for now. Hope this package will support for web in the near future so that I can continue working with the web part. Thank you!
First of all, thank you for your awesome plugin :)
More platforms
Currently, the plugin only supports Android and iOS. It'd be great if other platforms could be supported:
More authentication methods