Skip to content

How to change base url #1581

Discussion options

You must be logged in to vote

Hello
I found a solution to this:
You can specify what extra options can be passed to Auth's Axios directly from the nuxt-config.js

  auth: {
    plugins: [ '~/plugins/add-login-token.js' ],
    strategies: {
      apiLogin: {
        scheme: '~/schemes/apiLogin',
        endpoints: {
          login: {
            baseURL: process.env.API_URL,
            withCredentials: true,
            url: '/login',
            method: 'post'
          },
          logout: {
            baseURL: process.env.API_URL,
            withCredentials: true,
            url: '/logout',
            method: 'post'
          },
          user: {
            baseURL: process.env.API_URL,
            withCredent…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by LucianMihalache
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
3 participants
Converted from issue

This discussion was converted from issue #1576 on January 24, 2022 10:15.