Using $auth Module’s Redirect in Tandem With $router.push in Nuxt.jsby@abrar
3,825 reads
3,825 reads

Using $auth Module’s Redirect in Tandem With $router.push in Nuxt.js

by abrar2mMarch 15th, 2020
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Using $router.push in Nuxt.js and invoking a.router.push in subsequent line of code in the same method is redundant. The conundrum began when the lines after the.auth.loginWith method did not execute as intended since the page was redirected to the redirect. URL. The only thing left to do is disabling the redirect case in the. auth option: false will do the job! The.auth object in nuxt.config.js would look like this now:

Company Mentioned

Mention Thumbnail
featured image - Using $auth Module’s Redirect in Tandem With $router.push in Nuxt.js
abrar HackerNoon profile picture
abrar

abrar

@abrar

A Techie in Tokyo

About @abrar
LEARN MORE ABOUT @ABRAR'S
EXPERTISE AND PLACE ON THE INTERNET.

Share Your Thoughts

About Author

abrar HackerNoon profile picture
abrar@abrar
A Techie in Tokyo

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite
L O A D I N G
. . . comments & more!