Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

signInSilent/signInInteractive returning only token, not the response as documented #90

Open
jdipallo opened this issue Jan 20, 2022 · 3 comments

Comments

@jdipallo
Copy link

Hello:

Your documentation is very clear regarding the Response we should expect from successful calls to both signIn[Silent|Interactively]:
{
token: 'eyJ0eXAiOiJKV1QiLCJub...',
account: {
id: 'abc-someguid-123',
username: '[email protected]',
claims: [
{key: "name", value: "Robins, Walter"},
{key: "ver", value: "2.0"},
{ ... }
]
}
}

However, I am only seeing the token (what appears to be a token anyway). Not an JSON object.

Can you please assist?

Thank you

@jdipallo
Copy link
Author

@wrobins if possible, can you please help on this? Thank you.

@Horbee
Copy link

Horbee commented Feb 24, 2022

@jdipallo The same thing happens to me as well. I am not sure if it is still helpful for you, but I tried to do something similar as a workaround:

window.cordova.plugins.msalPlugin.signInInteractive(
      function (token) {
        // Success callback
        axios
          .get("https://graph.microsoft.com/v1.0/me", {
            headers: {
              Authorization: `Bearer ${token}`,
            },
          })
          .then((resp) => {
            console.log("USER:", JSON.stringify(resp.data));
          })
      },
      function (err) { .... }
    );

@jdipallo
Copy link
Author

@Horbee: yes, that is what I implemented. Works fine, just an extra call. I see in the Alpha version of this plug-in, this is seems resolved. Although, it's been in alpha for quite a while. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants