dgrubelic / vue-authenticate

Simple Vue.js authentication library
1.43k stars 252 forks source link

Not work on localhost #61

Open sonal241 opened 6 years ago

sonal241 commented 6 years ago

Please Tell me Procedure how to integrate or use your plugin in localhost. thanks in advance

dgrubelic commented 6 years ago

You have working app in /example folder in this repo. For social authentication, you just add appropriate clientId and redirectUri and you're good to go.

sonal241 commented 6 years ago

Thanks For instant reply. I am doing same it redirect to Facebook and google login page but how would test its authenticated or not because showing "isAuthenticated:(error during evaluation) " this error in vuejs

dgrubelic commented 6 years ago

Which version of the library do you have? Latest? Master or develop branch?

sonal241 commented 6 years ago

"vue-authenticate": "^1.3.1"

dgrubelic commented 6 years ago

It looks like dist and example folders have 1.3.0 version of the library. I'll have to check why it failed to update version.

Your error basically means that you are trying to display data from property that doesn't exist in view. Are you using the example or you wrote your own code?

waqasafzal commented 6 years ago

i'm trying to run example at localhost but unable to run example successfully because when i try to get auth from google, my request get "405 method not allowed". request url : http://localhost:8080/auth/google what i am doing wrong...

dgrubelic commented 6 years ago

That is probably because you set your baseUrl(which is actually your API url) to be the url of example client application.So you are sending a request to the same application you are running.

razbakov commented 6 years ago

@dgrubelic can you please provide some information about requirements of server-side, how to start server.js from example, etc.? It is not clear what is needed in order to run this component. Would be also nice to have working example with instructions how to start it.

dgrubelic commented 6 years ago

You can start it with npm run dev. This will start server so that you can run example app by visiting http://localhost:8080/.

razbakov commented 6 years ago

i am getting this error:

npm run dev

> vue-authenticate@1.3.4 dev ~/Projects/vue-authenticate
> parallelshell "node-dev ./example/server.js" "gulp dev"

child_process.js:400
    throw new TypeError('"cwd" must be a string');
    ^

TypeError: "cwd" must be a string

steps to reproduce:

dgrubelic commented 6 years ago

What version of node.js are you running?

razbakov commented 6 years ago
npm -v
5.3.0
kindaninja commented 6 years ago

TypeError: "cwd" must be a string

Fixed this by changing node_modules/parallelshell/index.js line 105

cwd: process.cwd

to

cwd: process.cwd()

as per https://github.com/indexzero/daemon.node/issues/41