GithubHelp home page GithubHelp logo

Comments (10)

mohanajuhi166 avatar mohanajuhi166 commented on April 28, 2024 1

@Prasannavenkatesh1 @jaym-xa PR has been raised here: #11

from aad_b2c_webview.

jaym-xa avatar jaym-xa commented on April 28, 2024 1

@mohanajuhi166

Following is my flutter code for the package,

     const aadB2CClientID = 'random-95eb-val-a09b-token';
    const aadB2CRedirectURL = 'https://login.live.com/oauth0_desktop.srf';
    const aadB2CUserFlowName = 'B2C_1A_signin_Mobile_Dev';
    const aadB2CScopes = ['openid', 'offline_access'];
    const aadB2TenantName = 'testTenantName';
    const aadB2CUserAuthFlow = 'https://<aadB2TenantName>.b2clogin.com/tfp/<aadB2TenantName>.onmicrosoft.com/';
    
    return Scaffold(
      body: ADB2CEmbedWebView(
        tenantBaseUrl: aadB2CUserAuthFlow,
        userFlowName: aadB2CUserFlowName,
        clientId: aadB2CClientID,
        redirectUrl: aadB2CRedirectURL,
        scopes: aadB2CScopes,
        onAnyTokenRetrieved: (Token anyToken) {},
        onIDToken: (Token token) {
          log('idToken==> ${token?.value ?? ''}');
        },
        onAccessToken: (Token token) {
           accessToken = token.value;
          log('accessToken==> ${accessToken ?? ''}');
        },
        onRefreshToken: (Token token) {
          refreshToken = token.value;
          log('refreshToken==> ${refreshToken ?? ''}');
        },
        optionalParameters: const [],
        onRedirect: (context) {
          log('accessToken==> ${accessToken ?? ''}');
          log('refreshToken==> ${refreshToken ?? ''}');

          return {
                  // Push user to new screen.
          };
        },
      ),
    );

So I was trying this demo as it in example package. But it was not working.

I'm always getting idToken and refreshToken. I was never getting accessToken. Also, inside the package itself you are not showing how to accesstoken in example demo. It's a basic need. Please fix and update.

Looking forward to having update on this issue.

from aad_b2c_webview.

jaym-xa avatar jaym-xa commented on April 28, 2024 1

@mohanajuhi166 Now working perfectly fine. I'm getting accessToken and refreshToken for the users.

Thank you.

from aad_b2c_webview.

mohanajuhi166 avatar mohanajuhi166 commented on April 28, 2024

Hi, we will have a look into this issue asap and will update!

from aad_b2c_webview.

mohanajuhi166 avatar mohanajuhi166 commented on April 28, 2024

@Prasannavenkatesh1 can you post the exact error and what example url/configs etc have you used?

from aad_b2c_webview.

jaym-xa avatar jaym-xa commented on April 28, 2024

@mohanajuhi166 Any updates on this package? I'm also facing the same issue.

from aad_b2c_webview.

jaym-xa avatar jaym-xa commented on April 28, 2024

@Prasannavenkatesh1 @jaym-xa PR has been raised here: #11

@mohanajuhi166 Thank you for quick support. Will check and update.

from aad_b2c_webview.

mohanajuhi166 avatar mohanajuhi166 commented on April 28, 2024

@jaym-xa please wait for this to be reviewed and merged. And then , we will get the changes published.

from aad_b2c_webview.

mohanajuhi166 avatar mohanajuhi166 commented on April 28, 2024

@jaym-xa please have a look and let me know, if you run into issues.

from aad_b2c_webview.

mohanajuhi166 avatar mohanajuhi166 commented on April 28, 2024

Solved.

from aad_b2c_webview.

Related Issues (18)

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.