question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to set\pass #id_token received from custom B2C policy and setup MSAL angular from it?

See original GitHub issue

I’m submitting a…


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[X] Other... Please describe:

This is more of a question: I already get and #id_token from my custom B2C Sign Up policy. However this policy is called from a link in an e-mail, not from the Angular SPA app.

With this in mind, the Angular JS app doesn’t have a callback to process this #id_token.

Is there any way to set the #id_token in the msalService in Angular JS so that the user is logged in automatically?

This id_token from the sign up policy already has all the user info I need to log them in into the application. I wouldn’t like to redirect them to the login page. This is an unnecessary step.

I’d like for something like this function:

UserAgentApplication.prototype.processCallBack = function (hash) {

or

UserAgentApplication.prototype.handleAuthenticationResponse = function (hash) {

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
sameeragcommented, Nov 8, 2019

@maheshkumagali Our angular wrapper is currently in progress of being upgraded to be compatible with our msal-core library. @jasonnutter is working on this and will be able to provide the details.

@jasonnutter This could be a use case we should address with our angular work.

0reactions
maheshkumagalicommented, Nov 8, 2019

@sameerag

Can you please help on how to achieve the same for msal-angular. We need to have roles in the jwt token that is attached, when we make api calls mentioned in protectedResourceMap. The sample works well when using msal library for js

Read more comments on GitHub >

github_iconTop Results From Across the Web

Untitled
Open the Azure portal and navigate to Microsoft Intune > Conditional access > Policies or navigate to Azure Active Directory > Conditional access...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found