From aa4c5ef672ad108dce1d7e9b21c4d7baf3c391f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Voron?= Date: Fri, 4 Nov 2022 09:40:21 +0100 Subject: [PATCH] Add doc about new OAuth callback error --- docs/usage/routes.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/usage/routes.md b/docs/usage/routes.md index 5e738554..78973f82 100644 --- a/docs/usage/routes.md +++ b/docs/usage/routes.md @@ -238,6 +238,15 @@ Depending on the situation, several things can happen: !!! fail "`400 Bad Request`" Invalid token. +!!! fail "`400 Bad Request`" + The OAuth provider didn't return an e-mail address. Make sure this provider return e-mail address through their API and you have asked for the required scope. + + ```json + { + "detail": "OAUTH_NOT_AVAILABLE_EMAIL" + } + ``` + !!! fail "`400 Bad Request`" Another user with the same e-mail address already exists. @@ -292,6 +301,15 @@ Handle the OAuth callback and add the OAuth account to the current authenticated !!! fail "`400 Bad Request`" Invalid token. +!!! fail "`400 Bad Request`" + The OAuth provider didn't return an e-mail address. Make sure this provider return e-mail address through their API and you have asked for the required scope. + + ```json + { + "detail": "OAUTH_NOT_AVAILABLE_EMAIL" + } + ``` + !!! success "`200 OK`" ```json {