What is the best way to authenticate users in microservices?

Did you find this post useful? Show some love!

I don't know if it's the best way because it depends on requirements, constraints and such but I would take a look at using an API Gateway as the auth layer.

The user requests an API, the gateway authenticates the requests, generates a token and opens the gates or blocks the request.

The type of auth flow depends a lot on what you want to accomplish but tools like Kong support different type of authentication methods (from basic auth to jwt to oauth2 to openid to others)

See also How can I add authentication to a microservice/API?

Another way might be to use an external authentication service, like Okta or Auth0

Classic DEV Post from May 29

Who's looking for open source contributors? (May 29 edition)

Please shamelessly promote your project. Everyone who posted in previous weeks is welcome back this week, as always.

Follow @ben to see more of their posts in your feed.
Saeed Moqadam
Member since Jan 29, 2018
Trending on dev.to
Thoughts on interpreted vs compiled languages?
If you don't hire juniors, you don't deserve seniors
#career #management #recruiting
Lessons I learned from training with special forces that I use in software development
#beginners #career #motivation #dieliving
Frequent delivery - how?
#discuss #delivery
How do you think of angularjs application
How long have you been programming?
Do you hide dev signatures in your code?
What is difference among enterprise architect, solution architect, software architect, system architect and cloud architect?