Azure-Samples / ms-identity-javascript-v2

VanillaJS sample using MSAL.js v2.x and OAuth 2.0 Authorization Code Flow with PKCE on Microsoft identity platform
MIT License
105 stars 84 forks source link

Cannot seem to get the configuration to work #9

Closed worldspawn closed 4 years ago

worldspawn commented 4 years ago

I have set authority to https://tenant.b2clogin.com/tenant.onmicrosoft.com/B2C_1A_Samssignup_signin and I receive error 400 - AADSTS50049: Unknown or invalid instance.

I have also tried https://tenant.b2clogin.com/tenant.onmicrosoft.com/tfp/B2C_1A_Samssignup_signin

const msalConfig = {
    auth: {
        clientId: 'theclientid',
        authority: 'https://tenant.b2clogin.com/tenant.onmicrosoft.com/B2C_1A_Samssignup_signin',
        redirectUri: 'http://localhost:3000/',
    },
    cache: {
        cacheLocation: "sessionStorage", // This configures where your cache will be stored
        storeAuthStateInCookie: false, // Set this to "true" if you are having issues on IE11 or Edge
    }
};

Could anyone advise what's wrong?

derisen commented 4 years ago

@worldspawn this sample is for AAD. For B2C, could you please check the sample here. We haven't updated it yet to use the msal@2.x with the auth code flow, as there are currently a few issues that we are expecting to be resolved (e.g.), but we will very soon.

worldspawn commented 4 years ago

Thanks @derisen. I did eventually find that sample, but yeh could not get that to work either.

derisen commented 4 years ago

Sorry to hear that @worldspawn -feel free to open a new issue in that sample's repo.