Closed JudeAlquiza closed 3 years ago
I just found the problem, in the home.component.html
<div class="container">
<div class="row">
<div class="col-sm">
</div>
<div class="col-sm">
<div class="form-signin">
<form>
<button class="w-100 btn btn-lg btn-primary" type="submit" style="margin-top: 130%;"
(click)="login()">Login</button>
<div style="margin-top: 10px;">Don't have an account yet ? Register <a href="#">here</a>.</div>
</form>
</div>
</div>
</div>
</div>
my button is inside of the form tag and type is set to submit, I just removed type="submit" and put the button outside of the form tag. closing this issue now. thanks.
Hi, I'm having this problem where in when I click on the login button as shown below, I'm redirected to the same page.
here's the log from the dev tools
I tried to run this example https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/samples/msal-angular-v2-samples/angular11-b2c-sample locally and it works fine with the Azure AD B2C configurations updated with the one I setup on my personal Azure AD B2C account.
But I'm having problems when I'm trying to apply that to my own Angular v11 project.
Here's my package.json
My app.module.ts and b2c-config.ts is the same as in the angular11-b2c-sample with config updated to my own config.
app.module.ts.
routing is a bit different, here's my app.component.html
app.component.ts
app-routing.module.ts
my default page is in the HomeComponent
home.component.html
the code for my home.component.ts is the same as the app.component.ts in the angular11-b2c-sample, I just took out things that I don't need.
hope.component.ts
checking in vs code I'm getting this error in the debugger console.
really need your help I'm kind of stuck in this for the past couple of days now, thanks in advance. :)
PS: one thing I noticed is that when I navigate directly to a route with a MsalGuard routeguard, I'm able to login but after login I'm getting this in the chrome dev tools console.
another thing I noticed is when I force it to use login.popup after clicking login button, I'm only getting a blank popup.