Error on refreshing auth token in Firebase iOS

Viewed 420

I'm trying to refresh my auth token in Firebase using swift as follows

let currentUser = Auth.auth().currentUser
currentUser?.getIDTokenForcingRefresh(true) { idToken, error in
    if error != nil {
       return;
    }
    self.userDataManager.fetchUser()
}

It's hitting the error return statement with,

message = "Requests to this API securetoken.googleapis.com method google.identity.securetoken.v1.SecureToken.GrantToken are blocked.";
status = "PERMISSION_DENIED";

I search around the docs, But couldn't find a proper solution for this. Please help with this.

1 Answers
Related