Ask HN: What is the best way to add authentication to REST API (for mobile)?
1–10 of 23 posts
Re: Ask HN: What is the best way to add authentication to REST API (for mobile)?
#2Keycloak is nice but requires some work.
Re: Ask HN: What is the best way to add authentication to REST API (for mobile)?
#3Re: Ask HN: What is the best way to add authentication to REST API (for mobile)?
#4For JWT to support revocation, you must store them in the database and delete them on logout or when they expire.
Re: Ask HN: What is the best way to add authentication to REST API (for mobile)?
#5Re: Ask HN: What is the best way to add authentication to REST API (for mobile)?
#6https://docs.aws.amazon.com/cognito/latest/developerguide/wh...
Re: Ask HN: What is the best way to add authentication to REST API (for mobile)?
#7An API Gateway is pretty Quick to set up, but the industry is moving away from it as a concept. Keycloak is nice but requires some work.
Can you elaborate on this?
Re: Ask HN: What is the best way to add authentication to REST API (for mobile)?
#8Re: Ask HN: What is the best way to add authentication to REST API (for mobile)?
#9Auth0 is not a bad option. For JWT to support revocation, you must store them in the database and delete them on logout or when they expire.
Re: Ask HN: What is the best way to add authentication to REST API (for mobile)?
#10Auth0 is not a bad option. For JWT to support revocation, you must store them in the database and delete them on logout or when they expire.
To clarify for JWT invalidation, you don’t have to store the whole token. Instead just store the jti or some other identifying field that can be checked.