Skip to content

Commit

Permalink
adds more account linking error code
Browse files Browse the repository at this point in the history
  • Loading branch information
rishabhpoddar committed Jun 28, 2024
1 parent fee2ba5 commit 2925374
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -459,5 +459,17 @@ This used to be an error code which is no longer valid and can be ignored.
```
- In order to link the third party user with the session user, we need to make sure that the session user is a primary user. However, that can fail if there exists another primary user with the same email as the session user, and in this case, this error is returned to the frontend.

### ERR_CODE_024
- This happens during third party sign in, when the user is trying to sign in with a non-primary user, and the third party provider does not verify their email, and their exists a primary user with the same email. This can also happen the other way around wherein the user is trying to sign in with the primary user (unverified email), and there exists a non-primary user with the same email.
- API Path is `/signinup POST`.
- Output JSON:
```json
{
"status": "SIGN_IN_UP_NOT_ALLOWED",
"reason": "Cannot sign in / up due to security reasons. Please contact support. (ERR_CODE_024)"
}
```
- This can be resolved by deleting the (non primary) user that has the same email ID, or by manually marking the email of the user as verified for the login method that they are trying to sign in with.

### Changing the error message on the frontend
If you want to display a different message to the user, or use a different status code, you can change them on the frontend via [the language translation feature](../translations).
Original file line number Diff line number Diff line change
Expand Up @@ -459,5 +459,17 @@ This used to be an error code which is no longer valid and can be ignored.
```
- In order to link the third party user with the session user, we need to make sure that the session user is a primary user. However, that can fail if there exists another primary user with the same email as the session user, and in this case, this error is returned to the frontend.

### ERR_CODE_024
- This happens during third party sign in, when the user is trying to sign in with a non-primary user, and the third party provider does not verify their email, and their exists a primary user with the same email. This can also happen the other way around wherein the user is trying to sign in with the primary user (unverified email), and there exists a non-primary user with the same email.
- API Path is `/signinup POST`.
- Output JSON:
```json
{
"status": "SIGN_IN_UP_NOT_ALLOWED",
"reason": "Cannot sign in / up due to security reasons. Please contact support. (ERR_CODE_024)"
}
```
- This can be resolved by deleting the (non primary) user that has the same email ID, or by manually marking the email of the user as verified for the login method that they are trying to sign in with.

### Changing the error message on the frontend
If you want to display a different message to the user, or use a different status code, you can change them on the frontend via [the language translation feature](../translations).
Original file line number Diff line number Diff line change
Expand Up @@ -459,5 +459,17 @@ This used to be an error code which is no longer valid and can be ignored.
```
- In order to link the third party user with the session user, we need to make sure that the session user is a primary user. However, that can fail if there exists another primary user with the same email as the session user, and in this case, this error is returned to the frontend.

### ERR_CODE_024
- This happens during third party sign in, when the user is trying to sign in with a non-primary user, and the third party provider does not verify their email, and their exists a primary user with the same email. This can also happen the other way around wherein the user is trying to sign in with the primary user (unverified email), and there exists a non-primary user with the same email.
- API Path is `/signinup POST`.
- Output JSON:
```json
{
"status": "SIGN_IN_UP_NOT_ALLOWED",
"reason": "Cannot sign in / up due to security reasons. Please contact support. (ERR_CODE_024)"
}
```
- This can be resolved by deleting the (non primary) user that has the same email ID, or by manually marking the email of the user as verified for the login method that they are trying to sign in with.

### Changing the error message on the frontend
If you want to display a different message to the user, or use a different status code, you can change them on the frontend via [the language translation feature](../translations).

0 comments on commit 2925374

Please sign in to comment.