Can I login passing mail and password as a parameters?

Hello!

I’m using auth0 library for angular and I’m trying to implement a direct login if I pass a parameter.
I’ve created an endpoint in my API connected to A0 API and I tested it on SWAGGER and it works, it the A0 user exists and de mail and password are correct, it returns me the Acess_Token for the user.

But what im trying to do is to implement that logic into the angular and frontend.
What im trying is , if a user sends as a parameter his login and password, check that endpoint and redirect to Home page with the access_token, but I dont know how to do it.

I’ve tried many options but always end in the login universal screen and with the LoginWithRedirect().

It is possible to do it? Thank you in advance.

HI @Totodile,

You are looking for the Resource Owner Password Grant.

This grant type is typically not recommended and is not available in the Auth0 Angular SDK.

If you search that name you will find more info on why it is not recommended as well as how to implement it.

Thank you @dan.woda for your answer!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.