fix: bearer user id login development
This commit is contained in:
1 parent
bbd2f02d54
commit
df5018669c
1 file changed
+10
@@ -40,6 +40,16 @@ class AuthService extends BaseService {
|
|||||||
* error: a string with the error message
|
* error: a string with the error message
|
||||||
*/
|
*/
|
||||||
async authenticateAPIToken(token) {
|
async authenticateAPIToken(token) {
|
||||||
|
if (process.env.NODE_ENV === "development") {
|
||||||
|
try {
|
||||||
|
const user = await this.userService_.retrieve(token)
|
||||||
|
return {
|
||||||
|
success: true,
|
||||||
|
user,
|
||||||
|
}
|
||||||
|
} catch (error) {}
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const user = await this.userService_.retrieveByApiToken(token)
|
const user = await this.userService_.retrieveByApiToken(token)
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in new issue
Block a user