You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note this must be done before the server starts listening. You'll need to create an Express app before doing this. Then, do as follows:
pavlok.init("clientId",
"clientSecret", {
"verbose": true,
"app" : app, //Express server
"message": "Hello from the server example!", //Default message for all stimuli
"callbackUrl": "http://www.myserver.com/pavlok/result",
"callbackUrlPath": "/pavlok/result",
"successUrl": "/success", //Where to redirect when the token has been saved to session
"errorUrl": "/error" //Where to redirect when the token couldn't be gotten/saved
});
Afterwards, you can setup a route on your Express app to perform the Pavlok authorization. You'll be redirected to successUrl or errorUrl depending on whether the authorization works. This routing is done as follows: