FEAT: oauth sign in

This commit is contained in:
Gabriel Rosa
2023-01-24 19:19:00 -03:00
parent 28efdf95d9
commit 2bc060b13d
9 changed files with 281 additions and 11 deletions
+34
View File
@@ -89,3 +89,37 @@ const ErrorCodes = {
};
export default ErrorCodes;
export const OauthErrors = {
INVALID_CREDENTIALS: {
'pt-br': {
error: 'Erro ao autorizar',
error_description: 'Credenciais inválidas. Tente novamente',
},
'en-us': {
error: 'Authorization Error',
error_description: 'Invalid credentials. Please try again',
},
},
USER_NOT_FOUND: {
'pt-br': {
error: 'Erro ao autorizar',
error_description: (email) => `Usuário não existe na Dadosfera: ${email}`,
},
'en-us': {
error: 'Authorization Error',
error_description: (email) =>
`User does not exist on Dadosfera: ${email}`,
},
},
INVALID_SESSION: {
'pt-br': {
error: 'Erro ao autorizar',
error_description: 'Sessão inválida!',
},
'en-us': {
error: 'Authorization Error',
error_description: 'Invalid session!',
},
},
};