Commit 9e6d9812 authored by CarlosGC1989's avatar CarlosGC1989
Browse files

Arregla error en node con ruta para login

parent 4a1b7387
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -91,6 +91,8 @@ function onOauthTokenRequest(req, res) {

	var query = req.query,
		headers = req.headers,
		protocol = headers['x-forwarded-proto'],
		host = headers.host,

		clientId = query.clientid,
		password = query.password,
@@ -99,7 +101,7 @@ function onOauthTokenRequest(req, res) {
		clientCredentials = clientId + ':' + oauthClientSecret,
		base64ClientCredentials = Buffer.from(clientCredentials).toString('base64'),

		url = headers.origin + '/api/oauth/token',
		url = protocol + '://' + host + '/api/oauth/token',
		authorization = 'Basic ' + base64ClientCredentials,
		body = "grant_type=password&username=" + username + "&password=" + password + "&scope=write",