Skip to content

Commit f28a5ce

Browse files
committed
Clear the Google token, to ensure it isn't stored
Firebase's JWT is still stored until it expires, but the Google token isn't
1 parent 15e5517 commit f28a5ce

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

library/src/main/java/com/firebase/ui/auth/google/GoogleOAuthTask.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ protected String doInBackground(String... emails) {
2323

2424
try {
2525
token = GoogleAuthUtil.getToken(mContext, emails[0], "oauth2:profile email");
26+
// since we're immediately exchanging this token for a Firebase JWT token, we don't need to store it
27+
GoogleAuthUtil.clearToken(mContext, token);
2628
} catch (UserRecoverableAuthException e) {
2729
Log.e(TAG, "Error getting token", e);
2830
} catch (GoogleAuthException e) {

0 commit comments

Comments
 (0)