Sign-In Page – redirect_uri

When exchanging the code for tokens, you need to pass the redirect_uri:

https://developer.okta.com/authentication-guide/implementing-authentication/auth-code#3-exchanging-the-code-for-tokens

In your logincall controller:

$query = http_build_query([
        'grant_type' => 'authorization_code',
        'code' => $code,
        'redirect_uri' => 'https://fjatsh.dev/logincall'
    ]);

Let me know if this resolves it!

1 Like