# I am having the troubles starting with vue3 and auth0 - invalid\_request: Missing required parameter: client\_id

**URL:** <https://community.auth0.com/t/i-am-having-the-troubles-starting-with-vue3-and-auth0-invalid-request-missing-required-parameter-client-id/103508>\
**Category:** Get Help\
**Tags:** login-prompt-new-experience, login-experience\
**Created:** [March 28, 2023, 11:29am UTC](https://community.auth0.com/t/i-am-having-the-troubles-starting-with-vue3-and-auth0-invalid-request-missing-required-parameter-client-id/103508 "2023-03-28T11:29:53Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![pedro.sarmento](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@pedro.sarmento](https://community.auth0.com/u/pedro.sarmento)\
**Post date:** [March 28, 2023, 11:29am UTC](https://community.auth0.com/t/i-am-having-the-troubles-starting-with-vue3-and-auth0-invalid-request-missing-required-parameter-client-id/103508/1 "2023-03-28T11:29:53Z")

</div>

I am having **invalid\_request** : Missing required parameter: client\_id on a new Vue3 Auth0-vue.

Can anyone help where is the problem?

I am using auth0-vue 2.1.0 and Vue 3.2.47.

Configuration of Auth on a auth0.js file:

```auto
import { createAuth0 } from '@auth0/auth0-vue';
import router from './router'

export default createAuth0({
    domain: "domain",
    client_id: "clientid",
    authorizationParams: {
        redirect_uri: window.location.origin
    },
    onRedirectCallback: appState => {
        router.push(
            appState && appState.targetUrl
                ? appState.targetUrl
                : window.location.pathname
        );
    },
    cache: {
        cacheLocation: 'localStorage', // This configures where your cache will be stored
        storeAuthStateInCookie: true, // Set this to "true" if you are having issues on IE11 or Edge
        secureCookies: false,
    }
})

```

on main.js I have:

```auto
....
import router from './router'

import store from './store'

import auth0 from './auth0'

const app = createApp(App)
app.use(auth0).use(vuetify).use(router).use(store).mount('#app')

```

and on the component where I have the button to request the login:

```auto
...
login() {
            alert('Login: ' + JSON.stringify(this.$auth0))
            this.$auth0.loginWithRedirect({
                appState: {
                    target: "/projects",
                }
            });
        },
...

```

on the alert above the auth0 appears to be correct with:

```auto
{"clientOptions":{"domain":"domain,"client_id":"clientid","authorizationParams":{"redirect_uri":"http://localhost:1337"},"cache":{"cacheLocation":"localStorage","storeAuthStateInCookie":true,"secureCookies":false}},"_isLoading":{" __v_isShallow":false,"__ v_isRef":true,"_rawValue":true,"_value":true},"_isAuthenticated":{" __v_isShallow":false,"__ v_isRef":true,"_rawValue":false,"_value":false},"_user":{" __v_isShallow":false,"__ v_isRef":true,"_rawValue":{},"_value":{}},"_idTokenClaims":{" __v_isShallow":false,"__ v_isRef":true},"_error":{" __v_isShallow":false,"__ v_isRef":true,"_rawValue":null,"_value":null},"isLoading":{" __v_isShallow":false,"__ v_isRef":true,"_rawValue":true,"_value":true},"isAuthenticated":{" __v_isShallow":false,"__ v_isRef":true,"_rawValue":false,"_value":false},"user":{" __v_isShallow":false,"__ v_isRef":true,"_rawValue":{},"_value":{}},"idTokenClaims":{" __v_isShallow":false,"__ v_isRef":true},"error":{" __v_isShallow":false,"__ v_isRef":true,"_rawValue":null,"_value":null},"_client":{"userCache":{},"defaultOptions":{"authorizationParams":{"scope":"openid profile email"},"useRefreshTokensFallback":false,"useFormData":true},"options":{"authorizationParams":{"scope":"openid profile email","redirect_uri":"http://localhost:1337"},"useRefreshTokensFallback":false,"useFormData":true,"domain":"domain","client_id":"clientid","cache":{"cacheLocation":"localStorage","storeAuthStateInCookie":true,"secureCookies":false},"auth0Client":{"name":"auth0-vue","version":"2.1.0"}},"httpTimeoutMs":10000,"cookieStorage":{},"orgHintCookieName":"auth0.undefined.organization_hint","isAuthenticatedCookieName":"auth0.undefined.is.authenticated","sessionCheckExpiryDays":1,"scope":"openid profile email","transactionManager":{"storage":{},"storageKey":"a0.spajs.txs.undefined","transaction":{"nonce":"UkxZVEFrRUpGVERncjNIVmtFOFVwQzFsZV9VZDR4WHpBbzJfUXAxNWdORA==","code_verifier":"a9PbGhGXl8UyxCQ0HdGgHaICjpdZz40xr9lY583aKTS","scope":"openid profile email","audience":"default","redirect_uri":"http://localhost:1337","state":"bXNYSnB1YjFNVy1NUEpJMXlLWkJhbU9QcHk3aVpUTTg0YlZuN0t1RGlVZA==","appState":{"target":"/projects"}}},"cacheManager":{"cache":{"cacheLocation":"localStorage","storeAuthStateInCookie":true,"secureCookies":false},"keyManifest":{"cache":{"cacheLocation":"localStorage","storeAuthStateInCookie":true,"secureCookies":false},"manifestKey":"@@auth0spajs@@::undefined"}},"domainUrl":"https://domain","tokenIssuer":"https://domain/"}}

```

Can anyone help me see where is the problem?

Best regards,

---

<div class="post-metadata">

**Author:** ![sylvain.conti](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sylvain.conti/32/40682_2.png) [@sylvain.conti](https://community.auth0.com/u/sylvain.conti)\
**Post date:** [March 28, 2023, 12:18pm UTC](https://community.auth0.com/t/i-am-having-the-troubles-starting-with-vue3-and-auth0-invalid-request-missing-required-parameter-client-id/103508/2 "2023-03-28T12:18:46Z")

</div>

You have to specify your own clientid and tenant information. See this tutorial :

> **[Auth0 Vue SDK Quickstarts: Add Login to your Vue App](https://auth0.com/docs/quickstart/spa/vuejs/interactive)**
>
> Auth0 allows you to add authentication to almost any application type quickly. This guide demonstrates how to integrate Auth0, add authentication, and display user profile information in any Vue application using the Auth0 Vue SDK.

---

<div class="post-metadata">

**Author:** ![pedro.sarmento](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@pedro.sarmento](https://community.auth0.com/u/pedro.sarmento)\
**Post date:** [March 28, 2023, 2:02pm UTC](https://community.auth0.com/t/i-am-having-the-troubles-starting-with-vue3-and-auth0-invalid-request-missing-required-parameter-client-id/103508/3 "2023-03-28T14:02:03Z")

</div>

I hide the value so they are not public but the values are the correct ones that appear in the Auth0 page:  
Domain: dev-1flzkotdey2fm@@@.us.auth0.com  
Client: OairsgbVMfSz5GNl6k0QuWXq4kmcm@@@

---

<div class="post-metadata">

**Author:** ![pedro.sarmento](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@pedro.sarmento](https://community.auth0.com/u/pedro.sarmento)\
**Post date:** [March 28, 2023, 3:01pm UTC](https://community.auth0.com/t/i-am-having-the-troubles-starting-with-vue3-and-auth0-invalid-request-missing-required-parameter-client-id/103508/4 "2023-03-28T15:01:47Z")

</div>

As far as I can see, although createAuth0 has the client\_id parameter in the creation, it appears at the this.$auth0 variable, but it does not go to the URL for the loginWithRedirect:  
[https://dev-1flzkotdey2fm74y.us.auth0.com/authorize?scope=openid+profile+email&audience=https%3A%2F%2Fdev-1flzkotdey2fm74y.eu.auth0.com%2Fuserinfo&redirect\_uri=http%3A%2F%2Flocalhost%3A1337&response\_type=code&response\_mode=query&state=OXZxQU1qOWFnM05uR0pnU1Jlc2N4OEFkdVZ5aG45N0NJY1lvemdTY1dKZA%3D%3D&nonce=aHFMQnJITGxsZ0U4TUNyfjdTWXFNSUdDVktlQVlpVDJyQS5DflVxQVVhdQ%3D%3D&code\_challenge=DqvNFGsswMkTjOCRvQFVkqp1iKst5BxbhgK1vY7F2Kc&code\_challenge\_method=S256&auth0Client=eyJuYW1lIjoiYXV0aDAtdnVlIiwidmVyc2lvbiI6IjIuMS4wIn0%3D](https://dev-1flzkotdey2fm74y.us.auth0.com/authorize?scope=openid+profile+email&audience=https%3A%2F%2Fdev-1flzkotdey2fm74y.eu.auth0.com%2Fuserinfo&redirect_uri=http%3A%2F%2Flocalhost%3A1337&response_type=code&response_mode=query&state=OXZxQU1qOWFnM05uR0pnU1Jlc2N4OEFkdVZ5aG45N0NJY1lvemdTY1dKZA%3D%3D&nonce=aHFMQnJITGxsZ0U4TUNyfjdTWXFNSUdDVktlQVlpVDJyQS5DflVxQVVhdQ%3D%3D&code_challenge=DqvNFGsswMkTjOCRvQFVkqp1iKst5BxbhgK1vY7F2Kc&code_challenge_method=S256&auth0Client=eyJuYW1lIjoiYXV0aDAtdnVlIiwidmVyc2lvbiI6IjIuMS4wIn0%3D)

---

<div class="post-metadata">

**Author:** ![pedro.sarmento](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@pedro.sarmento](https://community.auth0.com/u/pedro.sarmento)\
**Post date:** [March 28, 2023, 3:08pm UTC](https://community.auth0.com/t/i-am-having-the-troubles-starting-with-vue3-and-auth0-invalid-request-missing-required-parameter-client-id/103508/5 "2023-03-28T15:08:03Z")

</div>

And when I add &client\_id=OairsgbVMfSz5GNl6k0QuWXq4kmcm@@@ to the connection string it works.

So my question is now why doesn’t createAuth0 in this context send the client\_id parameter in the URL?

---

<div class="post-metadata">

**Author:** ![pedro.sarmento](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@pedro.sarmento](https://community.auth0.com/u/pedro.sarmento)\
**Post date:** [March 28, 2023, 3:22pm UTC](https://community.auth0.com/t/i-am-having-the-troubles-starting-with-vue3-and-auth0-invalid-request-missing-required-parameter-client-id/103508/6 "2023-03-28T15:22:04Z")

</div>

Ok I resolved the problem. It was a typo since I come from the Vue2. It is not client\_id but clientId in the createAuth0

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [March 28, 2023, 4:49pm UTC](https://community.auth0.com/t/i-am-having-the-troubles-starting-with-vue3-and-auth0-invalid-request-missing-required-parameter-client-id/103508/7 "2023-03-28T16:49:39Z")

</div>

Ahh nice catch! Thanks for following up with the community 🤠

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [April 11, 2023, 4:50pm UTC](https://community.auth0.com/t/i-am-having-the-troubles-starting-with-vue3-and-auth0-invalid-request-missing-required-parameter-client-id/103508/8 "2023-04-11T16:50:19Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
