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

[auth] sometimes the user needs to login multiple times #529

Open
fcaps opened this issue Dec 10, 2023 · 1 comment
Open

[auth] sometimes the user needs to login multiple times #529

fcaps opened this issue Dec 10, 2023 · 1 comment
Labels

Comments

@fcaps
Copy link
Collaborator

fcaps commented Dec 10, 2023

there is an issue if you login and hydra is redirecting you back to the website callback, you will be directly redirected to login again.
we have to investigate what is happening on production, since i cannot reproduce it locally/xzy.

we could start searching for this log:

// security/bootPassport.js
      const oAuthPassport = {
            token,
            refreshToken
        }

        const apiClient = JavaApiClientFactory.createInstance(new UserService(), appConfig.apiUrl, oAuthPassport)
        const userRepository = new UserRepository(apiClient)

        userRepository.fetchUser(oAuthPassport).then(user => {
            verified(null, user)
        }).catch(e => {
            console.error('[Error] oAuth verify failed with "' + e.toString() + '"')
            verified(null, null)
        })

maybe the callback itself is not valid (url produced by hydra), by having a bad code/token. so we need to capture all urls in the browser.

@fcaps fcaps added the Bug label Dec 10, 2023
@fcaps
Copy link
Collaborator Author

fcaps commented Dec 14, 2023

UPDATE:
the logs show different errors, but not the "verify failed", we should disable the auto-redirect to "/login" if something fails and show log the error as "login-failed" or something.

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

No branches or pull requests

1 participant