Auth0 Home Blog Docs

Auth0-Lock login error

lock

#1

New to Auth0, testing it out to be part of our new platform but I can’t seem to get my head around the login section. I’m using Auth0-lock for the embedded widget and have registered users’ but when I try to login it errors.

https://github.com/auth0/auth0.js/issues/456 this is a resolved github issue that is exactly my issue but i can’t see how i need to apply this to my account as i’m unfamiliar with it in the first instance. Any can explain it so that I might know what I need to do?

It seems like this has been a fairly recent change so I can’t find information on this elsewhere.


#2

This error is because you need to enable the grant type http://auth0.com/oauth/grant-type/password-realm for your client. This can be done via the Management API - outlined here:

https://auth0.com/docs/clients/client-grant-types#edit-the-grant_types-property

Note: remember to include the existing grant_types (if you still want those to be enabled) in your request body, e.g.

{
    "grant_types": 
      "OTHER_EXISTING_GRANT_TYPES",
      ...
      "http://auth0.com/oauth/grant-type/password-realm"
    ]
}

These can be obtained from the GET a client endpoint: https://auth0.com/docs/api/management/v2#!/Clients/get_clients_by_id


#3

That’s done the trick, thanks a lot !

Don’t know why I couldn’t take that away from the original github issue!


#4