Firebase authentication workflow

Hi,

i posted earlier on API call failing within auth callback but haven’t seen a response. I was wondering if others have done authentication with Firebase and if they can explain the workflow. We have a simple use case where we need to authenticate a user and if they are signing up for the first time, we need to send a post API to our back end. Has anyone worked through something like this? We are using the Firebase authentication UI that they provide. Once we authenticate the user, we’re having trouble hitting the Post API. It keeps failing for some reason. We’re using firebase code for the call back: var uiConfig = {
callbacks: {
signInSuccessWithAuthResult: function(authResult, redirectUrl) {
var user = authResult.user;
var credential = authResult.credential;
var isNewUser = authResult.additionalUserInfo.isNewUser;
var providerId = authResult.additionalUserInfo.providerId;
var operationType = authResult.operationType;
console.log(“Begin User Signup”);
console.log("isnewuser= "+ isNewUser)
if (isNewUser) {
dmx.parse(“api1.load()”);

} else {
// block of code to be executed if the condition is false
}

For some reason, the api call in the if statement fails. We tested the same API call on a button to make sure it wasn’t the api configuration. Any wappler users out there who has done authentication? Can you share some knowledge with us? :slight_smile:

2 Likes