thedevdojo / auth-website

This is Auth Website for DevDojo Auth (https://github.com/thedevdojo/auth)
https://devdojo.com/auth
1 stars 3 forks source link

Issues when using Breeze starter kit with Vue and Inertia #4

Open imakeinternet opened 1 week ago

imakeinternet commented 1 week ago

Issue: Login and Registration Links in Modal Window Cause Unintended Side Effects with Laravel Breeze (Vue and Inertia)

Description

When using the default Laravel Breeze starter kit with Vue and Inertia, the login and register links are opened in a modal window, which causes side effects. Specifically, login and registration redirects happen inside the opened modal window, leaving the original (non-authenticated) site behind the modal window. This is not the desired behavior and confuses users.

Steps to Reproduce

  1. From the homepage, click Register
  2. Fill in the registration details
  3. Click Continue to submit the registration
  4. The modal window is redirected to the homepage (in logged-in status) with the original (non-authenticated) homepage behind the modal

The same issue occurs for the Login process:

  1. From the homepage, click Login
  2. Fill in the login details
  3. Click Continue to login
  4. The modal window is redirected to the homepage (in logged-in status) with the original (non-authenticated) homepage behind the modal

Expected Behavior

After registering or logging in, the user should be redirected to the authenticated homepage without the original (non-authenticated) homepage remaining in the background.

Actual Behavior

The modal window is redirected to the authenticated homepage while the original (non-authenticated) homepage remains in the background. This can be confusing, as the user sees the logged-in homepage within the modal and the non-authenticated homepage outside the modal.

Possible Solution

Add full support for Inertia by returning proper Inertia responses when Inertia is used. Ensure that the authentication redirects respond with an Inertia response that displays the appropriate view/route in an Inertia environment.

Environment

imakeinternet commented 1 week ago

Ugh, wrong repo. I have not had enough coffee this morning. Please delete.