Code Monkey home page Code Monkey logo

active-directory-javascript-singlepageapp-angular's Introduction

active-directory-javascript-singlepageapp-angular's People

Contributors

dependabot[bot] avatar derisen avatar jasonnutter avatar microsoft-github-operations[bot] avatar microsoftopensource avatar nikeshkamble25 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

active-directory-javascript-singlepageapp-angular's Issues

When i change the interaction type to redirect login not works

Please follow the issue template below. Failure to do so will result in a delay in answering your question.

When i change the interaction type to redirect login not works but it is not getting success but in your angular 10 sample it is working but not in mine

image

image

Library

Description

Please provide your question here, including as much relevant details as possible.

Examples:

"How do I use MSAL with Vue.js"
"How do I SSO between tabs?"
"How do I use MSAL to protect my custom Web API?"
"How can my app support multiple AAD tenants?"
"When will my scenario be supported?"
"When will this framework be supported"

useHash = True seems to break getting a token

I'm working on an Office AddIn so I need to use the Hash based routing in Angular.

@NgModule({ imports: [RouterModule.forRoot(routes, { useHash: true })], // , RouterModule.forChild(routes)], exports: [RouterModule] })

Doing this leaves me with an error in the popup:

image

I have no experience with the Hash routing strategy in Angular. Any ideas?

unable to get the access token after authentication

Please follow the issue template below. Failure to do so will result in a delay in answering your question.

Library

Description

hi Team,
I tried this solution build and complied. However when I try to get id_token after authentication, in authService.handleRedirectCallback I see this event not getting triggered. And also after redirection I am getting below error that forbidden:
image
with this id_token when I decode I am getting all necessary details of profile logged_IN but when I use access_token as shown in below screenshot and decode the same I don't get all the details of profile logged_IN:

image

Can anyone please suggest what I need to try to get this id_token to be stored somewhere in my code?

Examples:

"How do I use MSAL with Vue.js"
"How do I SSO between tabs?"
"How do I use MSAL to protect my custom Web API?"
"How can my app support multiple AAD tenants?"
"When will my scenario be supported?"
"When will this framework be supported"

User ID

I'm using this sample app with my own "client ID". I successfully logged in and get a UserID. At the same time, a bot I built with Bot Framework (https://docs.microsoft.com/en-us/azure/bot-service/?view=azure-bot-service-4.0) also gives a UserID. Both IDs are from the same user. However, they are different. Could you please explain?

To be clear, I'm building a bot which has a companion web app. The companion web app helps users to configure their preferences and few other settings. In this specific use case, I would expect the UserID from the bot and the UserID from single sign in should be identical.

Change configuration after production build

Hello.

I didn't really know how to tittle this issue therefore the tittle probably isn't the best. So what my problem actually is, is that we have many clients (20+) and everyone of this companies will use our app but they will all have different apps on azure thus the different clientId... different redirectUrl because our app will run on their servers.. and different authority probably.

So the problem is that right now in my app.module.ts I have statically defined configuration for msal module. I don't know how I would change this configuration dynamically. For other settings we have a file "settings.js" in our assets folder which we replace when we deploy our app to our clients. But this method is impossible to use in modules I guess since it throws an error.

image

I know I could use environments for this... but having 20+ environments is just to much. This cannot be the only solution.

Do you have any other guidelines or solutions for this? I would be really thankful if anyone could help me put here.

Regards.

Access token is empty

After logging in with me personal account and clicking on the profile link, I get the following error in the response:

{
  "error": {
    "code": "InvalidAuthenticationToken",
    "message": "Access token is empty.",
    "innerError": {
      "date": "2020-08-06T05:20:32",
      "request-id": "3d71ebc2-529e-40d0-9e83-e73f2aa60226"
    }
  }
}

It looks like MSALInterceptor do not attach an access token to the request. Have you had the same issue?

build app for production

Hi guys,
I'm trying to build the project with ng build --prod and deploy the resulting files into an web server, but there is a problem related to the loginPopup().

image

As depicted in the image above, after choosing the user to log in with, instead of going to the page where to enter my password, he shows me the home page of the application. Using ng serve everything works.
Some advices?

Access token null in the response

Hi,

I have pointed the source to my B2C environment and configured to display a sign-in user flow. After, successful sign-in , the response object has all the values like id_token, and some more. But, the access token in the response is coming as null. So, what
needs to be done to get the access token.

Thanks,

Console error

I downloaded the code from your repository and ran it after performing the given steps. When I ran it, on console it is showing an error. It is not allowing to run the application.

I dig more into it to resolve the issue and I found that when I remove the dependency injection of MsalService from constructor of AppComponent, application was running perfectly. So my first observation is, it is not injecting the MsalService dependency in constructor. Please find the attached screenshot of error.

image

Refresh Token

can you please add the refresh token in your repo.
Because its difficult for developer to do R&D and meet the time line

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.