Commit b866abdb authored by Andreas Åkre Solberg's avatar Andreas Åkre Solberg

Set redirect url to current url

parent 04076aa0
Pipeline #3732 passed with stages
in 4 minutes and 51 seconds
......@@ -9,18 +9,33 @@ class Component extends PureComponent {
constructor(props) {
super(props)
console.log("--- props", this.props)
// console.log("--- props", this.props)
// With these Location object properties you can access all of these URL components
//
// hash - Sets or returns the anchor portion of a URL.
// host - Sets or returns the hostname and port of a URL.
// hostname - Sets or returns the hostname of a URL.
// href - Sets or returns the entire URL.
// pathname - Sets or returns the path name of a URL.
// port - Sets or returns the port number the server uses for a URL.
// protocol - Sets or returns the protocol of a URL.
// search - Sets or returns the query portion of a URL
var currentURL = window.location.protocol + '//' + window.location.hostname + (window.location.port ? ':' + window.location.port : '' ) + '/callback'
console.log("currentURL", currentURL)
this.state = {
clientId: "6233aedf-f08a-4112-9a1b-f33c3cd9b396",
clientSecret: "af85a0f0-2c68-421d-8228-a6c83628de19",
redirectURL: "http://localhost:8080/callback"
clientSecret: "",
redirectURL: currentURL
}
}
authenticateStart() {
let config = Object.assign({}, this.props.serverConfig, this.state)
console.error("Authenticate", config, this.props.serverConfig, this.state)
// console.error("Authenticate", config, this.props.serverConfig, this.state)
this.props.authenticateStart(config)
}
......@@ -38,8 +53,8 @@ class Component extends PureComponent {
render() {
console.log("X This props", this.props)
console.log("X This state", this.state)
// console.log("X This props", this.props)
// console.log("X This state", this.state)
let authorizationEndpoint = ''
if (this.state.authorizationEndpoint) {
......
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