First attempt to login is always failed
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
- Run server (follow these steps https://github.com/apache/kibble/blob/master/CONTRIBUTING.md)
- Go to http://127.0.0.1:8000/login.html (Chrome or the other web browsers)
- Provide credentials
- Click the
Sign Inbutton
Actual result: The first try ends without any effects. You won't be logged.
OS: macOS Catalina
Logs: N/A
Other: N/A
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:
- fix the way sessions are set up, OR
- fire off a pre-flight API request to create a session before login, for instance calling
/api/sessionshould be enough to seed a new session.
Thx @Humbedooh for the answer. Which solution would be better?
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?