loopback4-starter icon indicating copy to clipboard operation
loopback4-starter copied to clipboard

Can't use Oauth2 resource owner login way

Open filol opened this issue 4 years ago • 5 comments

Describe the bug Can't connect via auth/login-token

I have add my user's id in user_id column of auth_clients table (and save it) but i still get this error :

{
    "error": {
        "statusCode": 401,
        "name": "UnauthorizedError",
        "message": "Bearer realm=\"Users\""
    }
}

The request body: (with the same body i can get the code with

{
    "client_id": "webapp",
    "client_secret": "saqw21!@",
    "username": "super_admin",
    "password": "test123!@#"
}

filol avatar Aug 05 '20 18:08 filol

Hi @filol , This error denotes that 'Bearer' is not attached to the token (which is being sent in the headers in the key 'Authorization'). But for this particular api, this should not be the case. This api does not expect any token. Can you share the changes that you might have made in the api?

mayank-SFIN571 avatar Aug 17 '20 04:08 mayank-SFIN571

@mayank-SFIN571 i have just update deps (why they are so out of date ?) and activate the db migration tool of lb (the native one)

filol avatar Aug 23 '20 14:08 filol

@mayank-SFIN571 can u please check which dependency is not up to date ?

samarpan-b avatar Sep 08 '20 18:09 samarpan-b

https://github.com/sourcefuse/loopback4-starter/pull/65 might resolve this issue. @filol can you please check ?

samarpan-b avatar Feb 27 '21 08:02 samarpan-b

@filol can you please confirm if it is okay to close this issue?

akshatdubeysf avatar May 18 '21 11:05 akshatdubeysf