nuxt / example-auth0

A simple example that shows how to use Nuxt.js with Auth0.
https://auth0.nuxtjs.org
MIT License
722 stars 159 forks source link

How to pass hidden parameters in middleware? #67

Closed StringKe closed 4 years ago

StringKe commented 4 years ago

I want to make jumps with parameters but not query parameters. exp:

middleware -> auth.js

import _ from 'lodash'

export default function(ctx) {
  if (!_.isEmpty(ctx.store.state.user)) {
    ctx.redirect({ name: 'index', query: { message: 'your login...' } })
  }
}

If you use the query parameters, the message will always exist when the user refreshes

This question is available on Nuxt community (#c41)
ghost commented 4 years ago

This issue as been imported as question since it does not respect example-auth0 issue template. Only bug reports and feature requests stays open to reduce maintainers workload. If your issue is not a question, please mention the repo admin or moderator to change its type and it will be re-opened automatically. Your question is available at https://cmty.app/nuxt/example-auth0/issues/c41.