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

First attempt to login is always failed #73

Open
michalslowikowski00 opened this issue Oct 24, 2020 · 3 comments
Open

First attempt to login is always failed #73

michalslowikowski00 opened this issue Oct 24, 2020 · 3 comments

Comments

@michalslowikowski00
Copy link
Contributor

michalslowikowski00 commented Oct 24, 2020

Description:
The first login attempt is always failed in the fresh Kibble instance.
After providing login credentials and hit the button Sign In there is no effect.
The second try is successful.

Reproduction steps:
Precondition: kill the server if you have running one

  1. Run server (follow these steps https://github.com/apache/kibble/blob/master/CONTRIBUTING.md)
  2. Go to http://127.0.0.1:8000/login.html (Chrome or the other web browsers)
  3. Provide credentials
  4. Click the Sign In button

Actual result:
The first try ends without any effects. You won't be logged.

OS:
macOS Catalina

Logs:
N/A

Other:
N/A

@Humbedooh
Copy link
Member

Known issue, happens because you don't have a cookie set before your browser visits the login API URL.
There are basically two ways we can address this:

  1. fix the way sessions are set up, OR
  2. fire off a pre-flight API request to create a session before login, for instance calling /api/session should be enough to seed a new session.

@michalslowikowski00 michalslowikowski00 pinned this issue Oct 25, 2020
@michalslowikowski00 michalslowikowski00 unpinned this issue Oct 25, 2020
@michalslowikowski00
Copy link
Contributor Author

Thx @Humbedooh for the answer.
Which solution would be better?

@turbaszek
Copy link
Member

Which solution would be better?

I would be in favour of 1. but this may be harder to do. Btw. do you think we should fix it now or wait until we refactor the API?

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

No branches or pull requests

3 participants