Skip to content
This repository was archived by the owner on Mar 3, 2022. It is now read-only.
This repository was archived by the owner on Mar 3, 2022. It is now read-only.

Cookies deleted but the tokens are still in Local Storage #1384

Open
@deepdesai003

Description

@deepdesai003

Hello, this is a question.

I am using oidc client for authenticating a JS client with identity server.
I have a callback html and this callback html is throwing an error every time the app is mounted and callback.html is called.
ErrorResponse: login_required

This happens only when a cookies is deleted, and the local storage still contains a an unexpired token.
My token is not expired, my code handles log out for token expiry.

What is the best practice, should I just suppress error?
Where can I see the logs, to pinpoint the reason for the message?

Deep

callback.html

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title></title>
</head>
<body>
    <script src="dist/oidc-client.min.js"></script>
    <script>
        var config = {
            response_mode: "query"
        }

        new Oidc.UserManager(config).signinRedirectCallback().then(function () {
            window.location = "/#/account-search";

        }).catch(function (e) {
            console.error(e);
        });
    </script>
</body>
</html>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions