1

i ma trying to make authentication system for my game i am stuck on the oobcode which is generated when the verify email is sent to email but to confirm this mail a oobCode is send by Firebase i want to know how to get Firebase rest API OOBCODE. i don't want to create a self server to dynamically handle i want to use Firebase option. with REST API.

enter image description here

Renaud Tarnec
  • 79,263
  • 10
  • 95
  • 121
  • It is not clear what you exactly want to achieve. Do you ask how to get the oobCode? Can you clarify. – Renaud Tarnec Sep 12 '20 at 11:54
  • Yes i want to know how to get oobcode that is send in verify email.but through REST API because Firebase.Auth doesn't work on my editor @Renaud Tarnec – Suhaim Khalid Sep 12 '20 at 12:24
  • Ok, so you want to get the oobCode in order to call the REST API. How do you send the "email verification" email? Do you also use the REST API (https://firebase.google.com/docs/reference/rest/auth#section-send-email-verification)? – Renaud Tarnec Sep 12 '20 at 12:44
  • Yes i want oobcode to confirm my email.all of my code is in REST API format. Can you plz tell me how to get this oobcode that is send in email – Suhaim Khalid Sep 12 '20 at 13:23

1 Answers1

2

The link in the "email verification" email contains the oobCode as a query string parameter. There is actually no way to generate this code via the Firebase Authentication API or via the Admin SDKs.

So, you need to extract the code from the query string and call the REST API endpoint with this code.


Note that you can customize the "action URL" included in the email (i.e. the link in the "email verification" email) through the Firebase console (click on the "Authentication" vertical menu item, then on the "Templates" tab). For example you can point to a web page that you host, which calls the REST API after having parsed the oobCode value from the URL.

Renaud Tarnec
  • 79,263
  • 10
  • 95
  • 121