Skip to content

Branch 'part 5-6', on page refresh token value set to the initial null #4

@keijop

Description

@keijop

I followed the flow for declaring variable token with initial value null and then using the setToken function to reassign the value outside of the module when user logs in.
This flow breaks for me when I refresh the page. After refreshing the page my http server requests return 401 Unauthorized with 'invalid token'. It seems that refreshing page reloads the module and variable token is null again. Dev tools show Authorization header being set with value null.
Anybody else had the same problem? Is it my code or is the flow in the example broken?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions