Auth0 Home Blog Docs

User created via API v2 cannot log in via Lock


#1

Hi. I’ve created user using Management API v2 (api/v2/users). New user is showing on my dashboard. Then I was trying to log in to my application, which is using Lock. App is running on localhost. I’m getting this warning in consol drawer: “Consent Required. Consent can’t be skipped on localhost. Read more here: https://auth0.com/docs/api-auth/user-consent#skipping-consent-for-first-party-clients”.
Problem is, i don’t know how to display Consent window while user is loging for the first time, or disable consent for users created via API.
If i create new user via SingUp on Lock window, everything works fine, because I’m getting Consent window, and I can accept it.

Can you help me with that?


#2

Can you share how you are initializing Lock and the function and parameters used for the login?


#3

Thanks for your question. I just noticed that options.auth.redirect has to be set to true. I had this option set to false, after changing it, it’s working fine.


#4

We’re glad to hear you got everything working! Be sure to let us know if you have any questions in the future and have a happy holidays!