Search code examples
angularauth0

Is there a method for login with email & password in @auth0/auth0-angular?


Auth0 SDK for Angular Single Page Applications - in docs there are 2 methods for login:

  • loginWithPopup
  • loginWithRedirect

Could we provide one more way to login with simple email & password?


Solution

  • You have to use in that case the Resource Owner Password Flow.

    make sure that your Grant Types includes Password, you will then call the oauth token api with your credentials and get an access token

    enter image description here

    check this https://auth0.com/docs/flows/call-your-api-using-resource-owner-password-flow