@obelisk/auth
Advanced tools
Comparing version 1.0.6 to 1.0.7
@@ -28,2 +28,3 @@ import { AuthEvent, ObeliskAuth } from './auth'; | ||
getLoginUrl(state?: string): Promise<string>; | ||
getLoginBody(state?: string): Promise<any>; | ||
/** | ||
@@ -30,0 +31,0 @@ * @inheritdoc |
@@ -25,2 +25,3 @@ import { ObeliskConfig, Tokens } from './types'; | ||
getLoginUrl(state?: string): Promise<string>; | ||
getLoginBody(state?: string): Promise<any>; | ||
/** | ||
@@ -27,0 +28,0 @@ * Handler for detecting and exchanging a authorization code parameter in the querystring of the uri. |
@@ -330,2 +330,25 @@ var AuthEventType; | ||
}; | ||
ObeliskAuthClient.prototype.getLoginBody = function (state) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
var queryFields, _a; | ||
return __generator(this, function (_b) { | ||
switch (_b.label) { | ||
case 0: | ||
_a = { | ||
scope: 'openid email profile', | ||
response_type: 'code', | ||
redirect_uri: this.config.redirectUri, | ||
client_id: this.config.clientId | ||
}; | ||
return [4 /*yield*/, this.getCodeChallenge()]; | ||
case 1: | ||
queryFields = (_a.code_challenge = _b.sent(), | ||
_a.code_challenge_method = 'S256', | ||
_a.state = state || Date.now() + '', | ||
_a); | ||
return [2 /*return*/, Promise.resolve(queryFields)]; | ||
} | ||
}); | ||
}); | ||
}; | ||
/** | ||
@@ -332,0 +355,0 @@ * @inheritdoc |
@@ -333,2 +333,25 @@ 'use strict'; | ||
}; | ||
ObeliskAuthClient.prototype.getLoginBody = function (state) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
var queryFields, _a; | ||
return __generator(this, function (_b) { | ||
switch (_b.label) { | ||
case 0: | ||
_a = { | ||
scope: 'openid email profile', | ||
response_type: 'code', | ||
redirect_uri: this.config.redirectUri, | ||
client_id: this.config.clientId | ||
}; | ||
return [4 /*yield*/, this.getCodeChallenge()]; | ||
case 1: | ||
queryFields = (_a.code_challenge = _b.sent(), | ||
_a.code_challenge_method = 'S256', | ||
_a.state = state || Date.now() + '', | ||
_a); | ||
return [2 /*return*/, Promise.resolve(queryFields)]; | ||
} | ||
}); | ||
}); | ||
}; | ||
/** | ||
@@ -335,0 +358,0 @@ * @inheritdoc |
{ | ||
"name": "@obelisk/auth", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
131313
965