I’m using Auth0JS in my Angular 5 application.
When I sign up a user using signupAndAuthorize, the result is good; an access token.
However, when I then call checkSession immediately, this results in an error “login_required”.
This seems conflicting; why does the signupAndAuthorize return an access token, but the checkSession requires logging in again?
@roland are you still experiencing this issue? The login_required
usually happens when you are signing in using a social provider with Auth0 dev keys and call checkSession
.
If this is not the case for you, can you please share your code to be able reproduce the issue.
@kimcodes I’m signing people of with a local account, so nothing to do with
This is the code:
signupEmailPassword(email: string, password: string): Observable<string> {
this.auth0.signupAndAuthorize(<any> {
email: email,
password: password,
redirectUri: `http://site.local:4200/auth-callback.html`,
connection: 'Username-Password-Authentication'
}, (err, authResult) => {
if (authResult && !err) {
this.setAuthenticated(authResult);
} else {
this._loggingService.log({
message: err.code + err.policy,
severity: LogSeverity.Error
});
}
});
}));
}
/// and then:
this.auth0.checkSession({}, (err, authResult) => {
if (err) {
// err is now login_required
});
Hey there!
Sorry for such huge delay in response! We’re doing our best in providing you with best developer support experience out there, but sometimes our bandwidth is not enough comparing to the number of incoming questions.
Wanted to reach out to know if you still require further assistance?