Search code examples
javafirebasefirebase-authenticationazure-active-directoryspark-java

Firebase Auth REST - Log in with Microsoft Provider


I'm trying to log in users to a Java Web application written in Java Spark framework using firebase Auth REST API here. Reason is since I couldn't find a better way to integrate with Firebase from this framework.

I can use VerifyPassword end point to login using email provider. But I want to use the Microsoft provider in firebase Auth Console instead of email.

Is there a way to use Microsoft Authentication through firebase using the REST API? enter image description here Thanks in advance!


Solution

  • There is. You are looking for Sign In With OAuth Credential section in the Firebase Auth REST API documentation.

    You can sign in a user with an OAuth credential by issuing an HTTP POST request to the Auth verifyAssertion endpoint

    However, the process won't be pretty straightforward like it is when using Firebase SDKs. You would have to get an access token from Microsoft (or any auth provider) and then pass it in the request body of Firebase's REST API.