Subscribe to response login

Hi,

I am using angular 4 to build my custom login page, and want to subscribe to response so I can post the errors on front end. Here is function below, please let me know how I can do this.

	public login(email: string, password: string, renew?: boolean): void {
		this.auth0.login({
			realm: 'cosmosdb',
			email,
			password
		}, (err, authResult) => {
			if (err) {
				console.log(err);
				throw new Error(`Error: ${err.error_description}. Check the console for further details.`);
			} else if (authResult && authResult.accessToken && authResult.idToken) {
				this.setSession(authResult, renew);
			}
		});
	}

	this.AS.login(email, password, rememberme).subscribe(){

       }

not sure what you want to do here… Is this an angular question? Is something not working with auth0?

yes it is sir, for it is in typescript code and stated in first paragraph what I want to do?

I want to subscribe to response so I can post errors visible to the user.

I have no experience with angular, so I’ll leave it open to see if anyone else knows how to answer this, but I think you’re better off asking this question on Stack Overflow

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?