fix: bearer user id login development

This commit is contained in:
Sebastian Rindom
2021-04-29 11:09:50 +02:00
parent bbd2f02d54
commit df5018669c

View File

@@ -40,6 +40,16 @@ class AuthService extends BaseService {
* error: a string with the error message
*/
async authenticateAPIToken(token) {
if (process.env.NODE_ENV === "development") {
try {
const user = await this.userService_.retrieve(token)
return {
success: true,
user,
}
} catch (error) {}
}
try {
const user = await this.userService_.retrieveByApiToken(token)
return {