Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't login with refresh token. Only with NPSSO #249

Open
VerburgtJimmy opened this issue May 15, 2023 · 1 comment
Open

Can't login with refresh token. Only with NPSSO #249

VerburgtJimmy opened this issue May 15, 2023 · 1 comment

Comments

@VerburgtJimmy
Copy link

VerburgtJimmy commented May 15, 2023

I am getting my refresh token with this code for now:
`

    $client = new Client();

    $client->loginWithNpsso("npssotoken");

    $refreshToken = $client->getRefreshToken()->getToken();

    Log::error(
        $refreshToken
    );

`

Then I save that refresh token in my DB and I try to login with this code:
`

    $token = Psn_token::first();

    log::debug($request->psn);

    $client = new Client();

    $client->loginWithRefreshToken($token);

    $query = $client->users()->me();

`
I also tried just pasting the refresh code in and that also doesn't work. When I run the code above I get this error:
{"userId":1,"exception":"[object] (Tustin\Haste\Exception\ApiException(code: 0): at {myuserroute}/backend/vendor/tustin/haste/src/Http/Middleware/ResponseHandlerMiddleware.php:58)

How do I fix this? Or what am I doing wrong?
Thanks
PS. When using the exact same code but with the loginwithnpssotoken function it does work.

@julianolandim
Copy link

I'm having the same problem :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants