Activities

dbeja

dbeja posted a new question

example-auth0 •

How to use with custom domain?

I already have everything set up and working on Auth0 side with a custom domain.
I tried to just change the domain on nuxt.config.js:

  auth: {
    redirect: {
      login: '/auth/login',
      callback: '/auth/signed-in'
    },
    fullPathRedirect: true,
    strategies: {
      local: false,
      auth0: {
        domain: 'customlogin.com',
        client_id: '------'
      }
    }
  }

But when I try to login I get this error from Auth0:
You should not be hitting this endpoint. Make sure to use the code snippets shown in the tutorial or visit support.auth0.com for help.

Auth0 also mention to add this to the configuration:

  overrides: {
      __tenant: config.auth0Tenant,
      __token_issuer: config.authorizationServer.issuer
  },

But I'm not sure where could I add this on NuxtJS.

orafaelreis

orafaelreis posted a new question

example-auth0 •

How can I mock auth module to work offline

Hey guys, firstly I want to say thank you for this awesome module.
My question is about to mock the $auth object when Internet is gone.
I tried some global nuxt objects but with no success. By the way, I am a beginner into Nuxt framework.
Thanks for this support.

Inklud

Inklud posted a new question

example-auth0 •

Logging out of the application

[SOLVED] Hi, When I press log out of the "example-auth0" I am successfully being logged out of the application, but I'm not being logged out of Auth0. So when I press log in again it logged me in without asking for password or if I want to change user.

It's the exact same issue as reported here:
https://community.auth0.com/t/does-not-show-user-login-prompt-anymore-after-the-first-logging-in/16504 (it points to a solution, but how can we implement this into "example-auth0"?

Wanted result (alternative 1):
When I press logout of the "example-auth0" I should both be logged out of the application and the auth0. And when i press log in again it should ask for password. How can we make this happen?

Solution: Change the logout link to the following

href="https://AUTH0DOMAIN/v2/logout?returnTo=APPURL&clientid=AUTH0CLIENTID">Sign Off

Replace AUTH0DOMAIN and AUTH0CLIENT_ID with your credentials,
and replace APPURL with the link to your apps location on the web. Remember to include the APPURL in the APP settings in auth0.com under "Allowed Logout URLs"

VienArchway

VienArchway posted a new bug report

example-auth0 •

bug Can not open more than 2-3 tabs browser in dev mode

Version

2.11.0

Reproduction link

https://auth0.nuxtjs.org/

Steps to reproduce

Example-Auth0 (https://github.com/nuxt/example-auth0)

I had copied this example repos to local and register like README setup file.

Screen Shot 2020-02-24 at 11.07.43.png

I still have no idea yet. But I'll try to research config in dev mode

What is expected ?

I want dev mode can open many tabs like pro mode

What is actually happening?

In dev mode, can not open more than 3 tabs browsers

Maxiride

Maxiride posted a new bug report

example-auth0 •

bug auth stuck at the callback URL — not storing Auth0 token

Version

v4.8.5

Reproduction link

https://nuxt.federicod.dev/

Steps to reproduce

  1. git clone https://github.com/nuxt/example-auth0.git;
  2. set Auth0 domain and client_id into nuxt.config.js (I am not using the .env file as it seems to me that it doesn't get embedded in the SPA after running npm run build)
  3. set mode: spa
  4. nuxt build
  5. deploy the dist folder
  6. access the website and try to login with [email protected]; [email protected]
  7. after the callback URL is opened, it stays stuck there

On a more complicated platform I am developing, some API calls that are made on the callback URL to populate a Vuex store all yields unauthorized error, meaning that the token doesn't get stored at all.

When running example-auth0 and the application I am developing in development mode with npm run dev, everything works fine. So I suppose that something goes wrong only after running the build command.

What is expected ?

I expect the callback URL to be opened and the token received stored.

What is actually happening?

The SPA stays stuck at the callback URL and no token is stored.

Additional comments?

Webserver: Caddy
Configuration:

nuxt.federicod.dev {
        root /root/dev/example-auth0/dist
}

No errors are shown in the console.

tcaraccia

tcaraccia posted a new question

example-auth0 •

Nuxt Universal and Auth0

Should web or spa be used in auth0 with a Nuxt Universal app ?

Perlover

Perlover posted a new question

example-auth0 •

JWT checking for signature?

Do I understand correctly that you do not check the JWT tokens for the validity of the signature? Judging by the source code, the username is simply retrieved from the token. And whether it was signed by Auth0 or not - there is no verification.

If this is the case, there to be needed a note about this in the README of this example. Otherwise, many programmers will create work sites on the basis of this example, in which the authorization zone will be “hacked” with any Base64-encoded JWT issued by any script.

WaldemarEnns

WaldemarEnns posted a new question

example-auth0 •

Repository uses a deprecated version of core-js

Problem

I try to follow the README.md and install the project locally. So i run npm install and it throws me the following error in the console:

npm install
npm WARN deprecated [email protected]2.6.11: [email protected]<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of [email protected]3.
npm ERR! Unexpected end of JSON input while parsing near '...4.0","lodash.uniq":"^'

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/enux/.npm/_logs/2020-01-29T12_48_51_713Z-debug.log

How to reproduce

Clone the repository:
git clone https://github.com/nuxt/example-auth0.git
cd example-auth0

Install the dependencies:
npm install

Solution proposal

The core-js dependency should be updated inside the package.json, package-lock.json and yarn.json.

suenot

suenot posted a new question

example-auth0 •

vuetify

Looking for vuetify gui for auth-lock.

StringKe

StringKe posted a new question

example-auth0 •

How to pass hidden parameters in middleware?

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

thibaultvanluchene

thibaultvanluchene posted a new question

example-auth0 •

Completely broken

Nothing to preview

WangHansen

WangHansen posted a new question

example-auth0 •

Cookie for storing JWT with httpOnly from backend?

From my understanding, there are three parts involved in a website:

  • Client (Browser)
  • Nuxt Server (For SSR)
  • Backend Server (For API)

I understand that localStorage cannot be used for storing JWT token, cookie needs to be used.
But I don't understand if this is the cookie for Client -> Nuxt communication, or Nuxt -> Backend communication.
And if on the Backend Server(API), I used httpOnly, can I still use the cookie in the Nuxt Server to store the data?
From my understanding, it should not be since Nuxt is the middle layer for rendering. If it is so, what is the way to correctly store JWT?

Another confusion raised from this is, for nuxtServerInit, the { req } param, is this the request from Client -> Nuxt or Nuxt -> Backend?

Sorry for all these questions, I searched a lot online but can't seem to find answers to these questions which I belive will help others as well.
Thanks for the help.

web-yangfan

web-yangfan posted a new question

example-auth0 •

No parser and no filepath given, using 'babel' the parser now but this will throw an error in the future. Please specify a parser or a filepath so one can be inferred.

No parser and no filepath given, using 'babel' the parser now but this will throw an error in the future. Please specify a parser or a filepath so one can be inferred.

1111.png

I have tried a lot of methods and can't solve it. Ask for help.

antoniosai

antoniosai posted a new feature request

example-auth0 •

idea test

What problem does this feature solve?

test

csrftoken

csrftoken posted a new question

example-auth0 •

About using Windows objects?

While you are working with middleware, I find that Windows objects are invoked. I wonder what you configured.
Could you help me use windows objects?

ton2142

ton2142 posted a new question

example-auth0 •

How to custom Universal Login ?

I edit custom in uniserval login auth0 test preview that work , But in project not work login form still show original . What wrong ?

Loic57

Loic57 posted a new question

example-auth0 •

'@nuxtjs/auth'

Why don't you use '@nuxtjs/auth' ?
I can't see it in packages.json whereas in this website : https://auth.nuxtjs.org/getting-started/setup It says you need it.

manylov

manylov posted a new question

example-auth0 •

Api call

Where to get token for backend api call?

manylov

manylov posted a new question

example-auth0 •

How to call backend api?

Hello, where to get token for backend calls?

yoyo837

yoyo837 posted a new question

example-auth0 •

Without Cookie

How to use token to implement auth this here without cookie at all ?