Unconsistent login behaviour with Cypress
For our implementation of Cypress on Hubl, I made a lighten version of the app containing only Sib Core, Sib Router and Sib Oidc.
After a login, the app is not logged in properly, I have to re-click on "Se connecter" and press again "Autoriser" to be properly logged in.
Video capture from Cypress:
Nothing on console, only an error from a missing css file on login page.
If I open the app by myself on firefox or chromium, it works fine.
Here's the complete code: https://git.startinblox.com/applications/sib-app/tree/testing/lighten-app-oidc-issue
Index file: https://git.startinblox.com/applications/sib-app/blob/testing/lighten-app-oidc-issue/src/index.pug
"CDN" used on the index is a simple clone of these repositories, on master, build as production for core, purpose only to allow us to put console logs wherever we want and start the app on containers. Notice that it's the same behavior with unpkg.
JS file to check user auth: https://git.startinblox.com/applications/sib-app/blob/testing/lighten-app-oidc-issue/src/scripts/sib-auth.js
If you want to run the branch, you'll need a djangoldp server with at least djangoldp-account package and oidc provider. Feel free to use this packages.yml:
ldppackages:
djangoldp_account: djangoldp_account
oidc_provider: 'git+https://github.com/jblemee/django-oidc-provider.git@develop'
server:
site_url: 'http://localhost:8000'
admin_email: admin@example.org
admin_name: admin
admin_pass: admin
xmpp_url: 'https://jabber.happy-dev.fr'
jabber_host: 'localhost'
default_client: 'http://localhost:3000'
You'll find the needed config.json
on the README.md file.
Don't know if it's related, but I've already noticed that some times I'm asked two times for "Autoriser" during a login.
@balessan This one isn't the one blocking us so far, but it'll right after we solve our current problem.