Add "Route Not Found" and "Require Authentication" views. #318
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #315
You'll now get either a Not Found or Auth Required page depending on what you hit in that url field vs logged in status.
Not authenticated:
![Screen Shot 2024-03-14 at 10 21 55-fullpage](https://private-user-images.githubusercontent.com/97147377/312936670-6b8482f0-e2e1-4c5e-8e67-7bf6c39fe288.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5MDk2MTMsIm5iZiI6MTczODkwOTMxMywicGF0aCI6Ii85NzE0NzM3Ny8zMTI5MzY2NzAtNmI4NDgyZjAtZTJlMS00YzVlLThlNjctN2JmNmMzOWZlMjg4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA3VDA2MjE1M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWM0MDI0OGZmZmY5ZDJlZGZlZTE5MzE2NDM5NDg5ZDE5OTU1OTY4Y2Q1YzVhNGQ4MjQ0NWRkOTQ5NzE4YjE0ZWYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.fZD2sgQt1r-kv5wJw47KL1fa7gYPOLlYBKi0cihz4Qw)
Not found:
![Screen Shot 2024-03-14 at 10 28 28-fullpage](https://private-user-images.githubusercontent.com/97147377/312938738-478cb881-fd45-4f82-86be-b2788f4707d6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5MDk2MTMsIm5iZiI6MTczODkwOTMxMywicGF0aCI6Ii85NzE0NzM3Ny8zMTI5Mzg3MzgtNDc4Y2I4ODEtZmQ0NS00ZjgyLTg2YmUtYjI3ODhmNDcwN2Q2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA3VDA2MjE1M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTBkMTdiNzU4ZTY5NTQzOWNjNDQ1NjY0NDFjMTQ0MjQzNTljZGEwNzU1OWM1NGNjMDIxNDQ0Nzg3OWZhNzIyMGImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.5AcKnMwMwDjf879wdv48GsLvB5ofvEl5eb-ZHXwmMGQ)
I had to merge the "Not authenticated" and "Is Public" app-level templates in order to fix a bug where having multiple router-view's causes onMounted to run multiple times. (Since we go from a isPublic to isAuth, the router-view for isAuth runs and refreshes the page.)
The redirect was actually quite easy to implement.