stefanvanherwijnen / quasar-app-extension-http-authentication

Token based authentication for Quasar Framework
MIT License
68 stars 15 forks source link

Override templates #9

Closed rtrudel closed 2 years ago

rtrudel commented 4 years ago

Is there a way to override templates for Login, Register etc.?

As it's hard coded within the module, I would like to know if it's possible to configure something to use pages and components from src instead?

Thank you!

stefanvanherwijnen commented 4 years ago

Yes, just use a Vue file in your src/pages/auth folder: https://github.com/stefanvanherwijnen/quasar-app-extension-http-authentication/blob/master/test/app/src/pages/auth/Register.vue and define the route in your routes file.

The AE will use that file instead https://github.com/stefanvanherwijnen/quasar-app-extension-http-authentication/blob/2899010fc264546f3a853901d456dc5ebd141196/src/boot/index.js#L94

Edit :Actually the file location does not matter, just make sure the route overrides the one in the AE.

widefoot commented 4 years ago

NavigationDuplicated {_name: "NavigationDuplicated", name: "NavigationDuplicated", message: "Navigating to current location ("/register") is not allowed", stack: "Error↵ at new NavigationDuplicated (webpack-int…node_modules/vue/dist/vue.runtime.esm.js:2178:14)"}

How I can fix it?

stefanvanherwijnen commented 4 years ago

Did you click on the register button while on the register page? Vue by default returns an error if you navigate to the current location. Google is your friend for a fix. If it's something else, let me know.

stefanvanherwijnen commented 2 years ago

Should be fixed or no longer applicable in v2.