MasoniteFramework / masonite

The Modern And Developer Centric Python Web Framework. Be sure to read the documentation and join the Discord channel for questions: https://discord.gg/TwKeFahmPZ
http://docs.masoniteproject.com
MIT License
2.21k stars 126 forks source link

Auth.routes() not matching with ones in the auth templates #812

Closed tahseenjamal closed 1 month ago

tahseenjamal commented 3 months ago

Describe the bug

python craft auth

generates auth controllers and templates. but there is a mismatch in the name used in template from the Auth route names

If you add in web.py

ROUTES += Auth.routes()

for route in ROUTES:
    print(f"{route.request_method}, {route.url}, {route.controller}, {route._name}")

And then run

python craft serve

Open localhost:8000/login You would see it throws error for Forgot password and Register links used via route function because they mismatch with the Auth.routes values

Expected behaviour

auth html templates route('NAME') should match with that of Auth.routes()

Steps to reproduce the bug

project create dummy
cd dummy
npm i
python craft auth
python craft serve

After that open browser and type below url

localhost:8000/login

Screenshots

No response

OS

macOS

OS version

Sonoma 14.0

Browser

Chrome

Masonite Version

4.20.0

Anything else ?

No response