kibble-1 icon indicating copy to clipboard operation
kibble-1 copied to clipboard

First attempt to login is always failed

Open michalslowikowski00 opened this issue 5 years ago • 3 comments

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

michalslowikowski00 avatar Oct 24 '20 16:10 michalslowikowski00

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.

Humbedooh avatar Oct 25 '20 07:10 Humbedooh

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

michalslowikowski00 avatar Oct 25 '20 16:10 michalslowikowski00

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?

turbaszek avatar Oct 25 '20 17:10 turbaszek