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

Logout form appears on click on Logout link #2481

Closed
SeverineB opened this issue Feb 23, 2023 · 2 comments
Closed

Logout form appears on click on Logout link #2481

SeverineB opened this issue Feb 23, 2023 · 2 comments

Comments

@SeverineB
Copy link

SeverineB commented Feb 23, 2023

          I can't recreate this. Did you customize the templates after you ran `phx.gen.auth`? The only way the logout text appears is if you're rendering it. If you can provide a minimal reproduction I would be able to take a closer look, but I don't believe this is an issue on our side. Thanks!

Originally posted by @chrismccord in #2479 (comment)

Thanks for your answer !
I don't know if it's the good way to create a new issue 😅

I tried to install a new app test, the setup is the same than the one described above.
I let the repo in public so you can access if needed.
gitlab repo
I dockerize the app but it does not matter for the logout problem.

I generate the authentication with mix phx.gen.auth Accounts User users and choose the Liveview one, then i had to edit the user_login_live.ex and user_registration_live.ex because the key name of the component input could not be created
so instead of
<.input field={@form[:email]} type="email" label="Email" required />
i changed the field as below
<.input field={{ @form, :email }} type="email" label="Email" required />

And then i tried to login / logout (I have set a network limit in Firefox to have time to do the screenshot) and the logout text appears as below :

image

I don't know if it's related to my setup or my install 😐

I also noticed that the flash message "Attempting to reconnect" appears each time i reload the login or register page (I read the issue about it and check in deps/phoenix_live_view/assets/js/phoenix_live_view/live_socket.js but it's ok

redirect(to, flash){
   this.unload()
   Browser.redirect(to, flash)
 }
 )
@josevalim
Copy link
Member

then i had to edit the user_login_live.ex and user_registration_live.ex because the key name of the component input could not be created

If this happens is because you are generating an app with Phoenix 1.7.0-rc2 instead of the latest release candidate. Could you try the latest release candidate too? You can run this before:

mix archive.install hex phx_new 1.7.0-rc.3

Thank you!

@SeverineB
Copy link
Author

Thanks a lot, everything works perfectly with the new release !

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

No branches or pull requests

2 participants