#NESTJS IAM

8 messages · Page 1 of 1 (latest)

ancient dagger
#

Hello there! I would like if that's possible to create system to generate user IAM. I explain:

  • I would like to give some access token to the new user. They can use it for one year.
  • I don't want to give them username and password. So they don't need to login but just using the access token to use some service in the backend
  • I actually using JWT but I'm stuck now. The user need to login to get a JWT acces token.

Can someone help me about that? Thank you in advance.

velvet blade
#

Creates an endpoint that receives a POST request and responds with an access token.

#

It is extremely insecure to do this, but since I don't know what you are doing, just do it. There is no secret, the person will make a request to the endpoint you created and you will generate the jwt and return it, simple as that.

#

If this person has contact with you, you can generate a temporary "password" system like Google Authenticator, and have only 1 field asking for this password, to protect your application, because if this endpoint is public, everyone will be able to generate the token. SINCE there is no password or username.

#

And if it really is something personal, simply generate the token with JS normally, copy it and send it to him... 🫥

#

Another "tip" would be, since you don't want to use a username and password, implement a login using Google OAuth for example... But anyway, I hope I helped.

#

But I admit that I didn't quite understand what you want... I read it several times but I couldn't understand it.

ancient dagger