File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -89,6 +89,30 @@ sign in, or sign in as the user on the server.
89
89
user = auth.sign_in_with_custom_token(token)
90
90
..
91
91
92
+
93
+ set_custom_user_claims
94
+ ----------------------
95
+
96
+ You can add custom claims to existing user, or remove
97
+ claims which was previously added to that account.
98
+
99
+ .. code-block :: python
100
+
101
+ # add claims
102
+ auth.set_custom_user_claims(user[' localId' ], {' premium' : True })
103
+
104
+ # remove claims
105
+ auth.set_custom_user_claims(user[' localId' ], {' premium' : None })
106
+ ..
107
+
108
+ .. note ::
109
+ 1. You need admin credentials (Service Account Key) to add or
110
+ remove custom claims.
111
+
112
+ 2. The new custom claims will propagate to the user's ID token
113
+ the next time a new token is issued.
114
+
115
+
92
116
sign_in_anonymous
93
117
-----------------
94
118
You can’t perform that action at this time.
0 commit comments