0

I am using Firebase with Google Identity Platform.

I need to configure the callback URL for Firebase Authentication email actions (password reset, email verification, etc.) programmatically. This is the URL where users are redirected after clicking links in authentication emails.

For example, I want all authentication emails (password reset, email verification) to redirect to https://myapp.com/auth/action instead of the default Firebase URL.

I've tried using the Firebase Admin SDK:

import { getAuth } from "firebase-admin/auth";
const auth = getAuth();
// What method should I use here to update the email callback URI?

I can see this is possible in the Firebase Console under Authentication > Templates > Email Address Verification > Edit Template > Custom Action URL, but I need to do this programmatically as part of our deployment process.

I found updateConfig in the Identity Platform API documentation with this Config object which suggests this is possible via REST:

{
  "notification": {
    "sendEmail": {
      "callbackUri": "https://myapp.com/auth/action",
      "method": "DEFAULT"
    }
  }
}

But I'm not sure how to properly access this configuration using the Firebase Admin SDK.

Is there a proper SDK method for this, or do I need to make direct REST calls to the Identity Platform API?

And if I do it via the Google Identity Platform REST API will that be sufficient for updating it in Firebase?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.