Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
O
oauth-play
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Code Review
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ASM
oauth-play
Commits
b866abdb
Commit
b866abdb
authored
Sep 08, 2017
by
Andreas Åkre Solberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set redirect url to current url
parent
04076aa0
Pipeline
#3732
passed with stages
in 4 minutes and 51 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
6 deletions
+21
-6
src/components/ServerConfigInput.jsx
src/components/ServerConfigInput.jsx
+21
-6
No files found.
src/components/ServerConfigInput.jsx
View file @
b866abdb
...
...
@@ -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
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment