auth0 / auth0-flutter

Auth0 SDK for Flutter
https://pub.dev/documentation/auth0_flutter/latest/
Apache License 2.0
59 stars 39 forks source link

Desktop support #173

Open Sesa1988 opened 1 year ago

Sesa1988 commented 1 year ago

Checklist

Describe the problem you'd like to have solved

Desktop support especially with social providers would be awesome, there is currently no package that supports this.

Describe the ideal solution

Everything should work like now but there is probably more work to be done because windows does not support url redirects. Other packages start a http server and listen for callbacks but they are all specific to a product.

Alternatives and current workarounds

No response

Additional context

No response

Widcket commented 1 year ago

Hi @Sesa1988, thanks for raising this.

Is this feature request for Windows support specifically?

Sesa1988 commented 1 year ago

Hi @Sesa1988, thanks for raising this.

Is this feature request for Windows support specifically?

This was just my preference but web support would be nice as well.

Im looking for a auth package that can be used on all Flutter platforms that support azure ad b2c and similar services.

Widcket commented 1 year ago

We already have https://github.com/auth0/auth0-flutter/issues/169 for tracking web support. As mentioned there:

Since Flutter for web supports interop with JS, you could use our SDK for SPAs: https://github.com/auth0/auth0-spa-js/.

Would that work for you?

Sesa1988 commented 1 year ago

We already have https://github.com/auth0/auth0-flutter/issues/169 for tracking web support. As mentioned there:

Since Flutter for web supports interop with JS, you could use our SDK for SPAs: https://github.com/auth0/auth0-spa-js/.

Would that work for you?

Im not sure how well this plays with Flutter web but Im looking more for desktop support.

Widcket commented 1 year ago

Thanks. We have no plans in the near term but I'll leave this issue open for future planning and reference.

sir-dunxalot commented 1 year ago

+1 to providing desktop support or making is clearer in the readme, tutorials, and quickstart that desktop is not supported.

Alternatively, it would be helpful to have a clearer error message. Trying to run auth0-flutter in a MacOS app results in the following error, which is misleading:

MissingPluginException(No implementation found for method webAuth#login on channel auth0.com/auth0_flutter/web_auth)

Thanks!

stevehobbsdev commented 1 year ago

@sir-dunxalot I think that's an error surfaced by the Flutter runtime rather than our plugin.

We're always happy to look at ways to make our support clearer. Currently the package on pub.dev is accurate in that it shows iOS and Android as supported platforms:

image

And we mention supported in the readme for this repo:

image
keepersmith commented 1 year ago

+1 to providing desktop support. One of the main reasons to use flutter in the first place is to chase the dream of one codebase for all (relevant) platforms. Please add desktop (and web) support. Thanks!

steve-winter commented 1 year ago

As I see it there are a few options:

Loopback: - potential MiTM risks

  1. Login triggers opening browser
  2. Perform normal login in browser
  3. Run server on loopback address
  4. Browser redirects to a loopback address (e.g. 127.0.0.1:1234)
  5. Close browser
  6. Loopback address broadly follows; https://github.com/auth0/auth0-flutter/blob/main/auth0_flutter/lib/src/web/auth0_flutter_plugin_real.dart
  7. Close loopback server and listen for login in initState.

Embedded Webview

  1. Open login in embedded webview
  2. Listen for relevant redirect and extract values

MacOS only 1. Package redirect (e.g. https://auth0.com/docs/quickstart/native/ios-swift/interactive)

Keen for any feedback re recommended/agreeable direction, and I will begin to put a PR together.

JordyLangen commented 1 year ago

Any updates on this topic? We are currently using https://pub.dev/packages/flutter_appauth (as it was used in previous Auth0 blogs on how to integrate with Auth0 and flutter).

Since then macOS support has been added which we are using quite intensely. Do you have any idea on the timeline for macOS support for this lib? I think ideally we'd like to move over to this lib but no macOS support is blocking us currently.

raphibolliger commented 1 year ago

For me, it would be also really nice to have Auth0 support on desktop platforms. Any chance that this will be implemented in the near future? Especially macOS should be almost the same as iOS.

Anish-Chanda commented 11 months ago

+1

JordyLangen commented 9 months ago

@Widcket are there any plans currently to support this?

Widcket commented 9 months ago

Hi @JordyLangen, we are currently working on adding support for macOS, though I can't share a specific ETA yet.

JordyLangen commented 9 months ago

@Widcket thats good to hear! Do you have a time window? This year? Q1 next year?

Widcket commented 9 months ago

Though this is no ETA, a rough time window would be around end of year.

Widcket commented 8 months ago

Hey everyone, macOS support is out now on v1.5.0.

jaipal-sodhi commented 7 months ago

Please provide support for windows as well

Gaurav-CareMonitor commented 5 months ago

@Widcket Any updates on Windows support? Is this going to be added in the near future?

avinash-bandgitech commented 1 month ago

Any updates on Windows support?

TristanGrobler commented 4 days ago

I would also love windows support.