Commit fcb77e4
Save token under original identifier, not canonical email
The previous commit saved tokens under the canonical email returned by
the Gmail profile API. This broke token lookup: the rest of the app
(HasToken, TokenSource, source records) keys on the user-supplied
identifier. If the canonical address differed (case, dots, googlemail),
the token file would be unreachable.
Fix: always save under the original identifier after validation
confirms the account matches. sameGoogleAccount() still rejects
wrong-account selection — it just no longer renames the file.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 6dbbc77 commit fcb77e4
1 file changed
+4
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
169 | 166 | | |
170 | 167 | | |
171 | 168 | | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
| 169 | + | |
178 | 170 | | |
179 | 171 | | |
180 | 172 | | |
| |||
0 commit comments