ABP Framework version: v3.0.5 UI type: Angular Db: MongoDb
We tried Microsoft login (AAD) in Razor Pages UI & Entity Framework Core for Microsoft login and its working fine. We would like to know whether Social login is provided/implemented in Angular-MondoDb template or not because tried it but not able to find it in Angular project. Or Please provide us link/video so we can have a look into it.
4 Answer(s)
-
0
Does it work for you?
https://stackoverflow.com/questions/55303781/asp-net-core-and-angular-microsoft-authentication
-
0
NO, but We tried using the above way and many different ways also, One thing we want to know that we are retireving access token using IdentityServer4 like this angular using OAuthService
return from(this.oAuthService.loadDiscoveryDocument()).pipe( switchMap((data) => from( this.oAuthService.fetchTokenUsingPasswordFlow( username, password, new HttpHeaders({ ...(tenant && tenant.id && { __tenant: tenant.id }) }), ).then((token)=>{ } ), ), ), switchMap((data) => this.store.dispatch(new GetAppConfiguration())), tap((data) => { const redirectUrl = snq(() => window.history.state.redirectUrl) || (this.options || {}).redirectUrl || '/'; this.store.dispatch(new Navigate([redirectUrl])); }), take(1), );
Here we get an access token and get access to all backend apis. Can we know how we will be get generate that access token if login using AAD through Oauth Implicit flow? because we are able to login using AAD in angular, generating accesstoken and claims as well but further process is not clear to us.
const tenant = this.store.selectSnapshot(SessionState.getTenant); this.oAuthService.tokenValidationHandler = new JwksValidationHandler(); this.oAuthService.configure( this.store.selectSnapshot(ConfigState.getOne('environment')).aadConfig, ); this.oAuthService.initImplicitFlow('providername=AzureOpenId');
After successful AAD login its redirecting to home controller where we can get accesstoken and claims.
this.oAuthService.tryLogin().then(() => { let claims = this.oAuthService.getIdentityClaims(); }
But as we know its not authentiing the user from database , its just a successfull microsoft login but not abp login as user is not part of the system.
Please help us in next process!
-
0
Hi @suraj.kumbhar
We developed the Angular UI to support Code Flow (PKCE). The Code Flow will be default authentication flow in the v3.1. In this flow, you will redirect to the Identity Server authentication page and be able to use all features of the Identity Server. If you can integrate the Azure AD to Razor Pages UI, you will be used the AD properly.
-
0
closing due to inactivity...