visa icon indicating copy to clipboard operation
visa copied to clipboard

Support more platforms and more authentication options

Open bdlukaa opened this issue 5 years ago • 10 comments

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:

  • [x] Android
  • [x] iOS
  • [ ] Web
  • [ ] macOS
  • [ ] Windows
  • [ ] Linux

More authentication methods

bdlukaa avatar Dec 24 '20 15:12 bdlukaa

@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.

e-oj avatar Dec 24 '20 16:12 e-oj

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.

e-oj avatar Dec 24 '20 16:12 e-oj

I can help with the implementation for web and windows.

bdlukaa avatar Mar 02 '21 17:03 bdlukaa

@bdlukaa That would be great.

e-oj avatar Mar 05 '21 15:03 e-oj

@bdlukaa any update on web support? Thanks!

jasonlaw avatar Jun 07 '21 01:06 jasonlaw

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 avatar Jun 18 '21 15:06 jasonlaw

@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.

e-oj avatar Jun 18 '21 19:06 e-oj

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.

bdlukaa avatar Jun 18 '21 20:06 bdlukaa

@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.

jasonlaw avatar Jun 18 '21 21:06 jasonlaw

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!

One good reading about it

jasonlaw avatar Jun 23 '21 11:06 jasonlaw