A custom claim luid
has been added to the Firebase Authentication from the backend, I’m looking for a way to access this key from the front end for an iOS application.
First I need to check if the key exists and if it exists then get its value.
What have I tried? Everything under Auth.auth().currentUser
Attaching a picture of the decoded JWT data, which shows the key luid
2
Answers
This will display a Dictionary with all the keys available for the current user.
This will return
Bool
value based on a particular key's availabilityYou can check the custom claims this way:
Detailed explanation can be found in documentation