Commit 8deb979c authored by Andreas Åkre Solberg's avatar Andreas Åkre Solberg

Fix for variable name, client_id

parent 87a44aba
...@@ -84,7 +84,7 @@ const API = { ...@@ -84,7 +84,7 @@ const API = {
// console.error("About to authentication", JSON.stringify(config, undefined, 3)) // console.error("About to authentication", JSON.stringify(config, undefined, 3))
const jsoconfig = { const jsoconfig = {
providerID: "oauthPlay", providerID: "oauthPlay",
client_id: config.clientId, client_id: config.client_id,
redirect_uri: config.redirectURL, redirect_uri: config.redirectURL,
authorization: config.authorization_endpoint authorization: config.authorization_endpoint
// scopes: { request: ["userinfo"]} // scopes: { request: ["userinfo"]}
...@@ -118,7 +118,7 @@ const API = { ...@@ -118,7 +118,7 @@ const API = {
var state = getState() var state = getState()
const jsoconfig = { const jsoconfig = {
providerID: "oauthPlay", providerID: "oauthPlay",
client_id: state.serverConfig.clientId, client_id: state.serverConfig.client_id,
redirect_uri: state.serverConfig.redirectURL, redirect_uri: state.serverConfig.redirectURL,
authorization: state.serverConfig.authorization_endpoint authorization: state.serverConfig.authorization_endpoint
// scopes: { request: ["userinfo"]} // scopes: { request: ["userinfo"]}
...@@ -134,22 +134,22 @@ const API = { ...@@ -134,22 +134,22 @@ const API = {
return (dispatch, getState) => { return (dispatch, getState) => {
var state = getState() var state = getState()
if (!state || !state.serverConfig || !state.serverConfig.clientId) { if (!state || !state.serverConfig || !state.serverConfig.client_id) {
// console.error("CANNOT DO CALLBACK BECAUSE CLIENDIT is missing...", state) console.error("CANNOT DO CALLBACK BECAUSE CLIENDIT is missing...", state)
return return
} }
// console.error(". STATE STATE STATE ", state) // console.error(". STATE STATE STATE ", state)
const jsoconfig = { const jsoconfig = {
providerID: "oauthPlay", providerID: "oauthPlay",
client_id: state.serverConfig.clientId, client_id: state.serverConfig.client_id,
redirect_uri: state.serverConfig.redirectURL, redirect_uri: state.serverConfig.redirectURL,
authorization: state.serverConfig.authorization_endpoint authorization: state.serverConfig.authorization_endpoint
// scopes: { request: ["userinfo"]} // scopes: { request: ["userinfo"]}
} }
// console.error(". Initialising oauth callback", jsoconfig) console.error(". Initialising oauth callback", jsoconfig)
appJSO = new jso(jsoconfig) appJSO = new jso(jsoconfig)
appJSO.callback(undefined, (token) => { appJSO.callback(undefined, (token) => {
// console.error(" ====) (===== Got token, ayay", token) console.error(" ====) (===== Got token, ayay", token)
dispatch(actions.tokens.save(token)) dispatch(actions.tokens.save(token))
}) })
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment