Closed yusef-ho closed 5 years ago
@yusef-ho that's a good catch! The custom claims should be the second argument.
function generateFirebaseToken(lineMid) {
var firebaseUid = 'line:' + lineMid;
var additionalClaims = {
provider: 'LINE'
};
return firebase.auth().createCustomToken(firebaseUid, additionalClaims);
}
More information here: https://firebase.google.com/docs/auth/admin/create-custom-tokens#create_custom_tokens_using_the_firebase_admin_sdk
cc @khanhlvg
Hello, while i was reading this article "Authenticate your Firebase users with LINE Login" There is additionalClaims in server.js, but i didn't see where we put this code? Thanks