Commit a26cbd5
committed
fix(oauth): auto-bind verified external login to existing active user by email
When an external OAuth connector returns a verified email address that
matches an existing active user account in Answer, the previous
implementation immediately aborted with UserAccessDenied (50x Access denied).
This required users who had previously registered with password to log in
first and manually bind the provider under user settings.
For open communities and seamless SSO onboarding, auto-bind the external
identity to the existing active user when the email matches, update their
last login timestamp, and issue an access token directly.
Signed-off-by: Rénich Bon Ćirić <renich@evalinux.com>1 parent 7f226dc commit a26cbd5
1 file changed
Lines changed: 19 additions & 12 deletions
Lines changed: 19 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
189 | | - | |
| 189 | + | |
| 190 | + | |
190 | 191 | | |
191 | | - | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
192 | 204 | | |
193 | 205 | | |
194 | 206 | | |
195 | 207 | | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
196 | 212 | | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
| 213 | + | |
202 | 214 | | |
203 | 215 | | |
204 | 216 | | |
| |||
211 | 223 | | |
212 | 224 | | |
213 | 225 | | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | 226 | | |
220 | 227 | | |
221 | 228 | | |
| |||
0 commit comments