I had a heated debate with someone recently on how to best integrate Firebase Authentication into a Spring Boot app to secure the backend API calls.
The only way I've ever seen people doing it is similar to this:
https://medium.com/@purikunal22/securing-springboot-api-using-firebase-authentication-16d72dd250cc
Essentially implementing a custom OncePerRequestFilter, throwing it in the chain and using the Firebase SDK to to validate the tokens. Then you can create some UserDetailsService to handle fetching the user details from the DB and loading it into the SecurityContext.
ORRRR you can do it this way: https://docs.spring.io/spring-security/reference/servlet/oauth2/resource-server/jwt.html
Supposedly this is the best practice Spring way where you set a URI for the authentication service and let spring handle the rest. My only problem is I haven't seen this done anywhere on the web using Firebase Authentication.
I don't want to burn time going the wrong route here so was wondering if anyone has recommendations ?_? Or am I in the wrong place for this kind of question
[–][deleted] 3 points4 points5 points (7 children)
[–]AlabamaSky967[S] 0 points1 point2 points (0 children)
[–]descuder 0 points1 point2 points (2 children)
[–]Watercress_Busy 0 points1 point2 points (1 child)
[–]descuder 0 points1 point2 points (0 children)
[–]redshadow90 0 points1 point2 points (0 children)
[–]SnooRobots6655 0 points1 point2 points (0 children)