GithubHelp home page GithubHelp logo

Comments (5)

mohanajuhi166 avatar mohanajuhi166 commented on June 10, 2024

@luancaius does this work for you ?

final aadB2CRedirectURL = 'customScheme://your_bundle_id/auth';

from aad_b2c_webview.

mohanajuhi166 avatar mohanajuhi166 commented on June 10, 2024

have a look here: #23

from aad_b2c_webview.

luancaius avatar luancaius commented on June 10, 2024

@mohanajuhi166 I tried the following scenarios:
Test 1 - Created web redirect on azure with redirect url as "https://bundle_id/auth" (set the same url on flutter)
I also update my AndroidManifest.xml, adding this:

<intent-filter>
      <action android:name="android.intent.action.VIEW" />
      <category android:name="android.intent.category.DEFAULT" />
      <category android:name="android.intent.category.BROWSABLE" />
      <data android:scheme="https" android:host="<bundle_id>" android:pathPrefix="/auth" />
</intent-filter>

On IOS I got a null exception:

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Null check operator used on a null value
#0      ADB2CEmbedWebViewState.initState.<anonymous closure> (package:aad_b2c_webview/src/presentation/aad_b2c_webview.dart:94:63)
#1      WebKitWebViewController._webView.<anonymous closure>.<anonymous closure> (package:webview_flutter_wkwebview/src/webkit_webview_controller.dart:299:32)
<asynchronous suspension>

and on Android I got Webpage not available with the token response and net::ERR_NAME_NOT_RESOLVED.
I wonder if I have to use any deep link here to redirect to my main page.

Test 2 - Same as 1 for url "https://.b2clogin.com/oauth2/nativeclient"
Didnt work at all, even updating the intent filter.

What I have working is using fluuter_appauth 6.0.6 and the following settings on azure and flutter:
IOS redirect url "msauth.<bundle_id>://auth"
Android redirect url "msauth://<bundle_id>/signature_hash"

Do I need to delete the other redirects and leave just the Web one?
Also if it's not a lot of work, an example using duende identity like https://pub.dev/packages/flutter_appauth/example would be very helpful.
Thank you!

from aad_b2c_webview.

mohanajuhi166 avatar mohanajuhi166 commented on June 10, 2024

@luancaius at the moment , the web redirect should work so you can try deleting those . Will look into the implementation by https://pub.dev/packages/flutter_appauth/example and implement it.

from aad_b2c_webview.

luancaius avatar luancaius commented on June 10, 2024

Tried deleting all others, and it was loading the login page, but still not working. My redirect url was https://bundle_id/auth. On IOS the login didn't redirect and on Android I got Webpage not available with the token, like before.

from aad_b2c_webview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.