@obelisk/auth
Advanced tools
Comparing version
@@ -44,4 +44,4 @@ import { AuthEvent, ObeliskAuth } from './auth'; | ||
*/ | ||
getLoginUrl(rememberMe: boolean, state?: string): Promise<string>; | ||
getLoginBody(rememberMe: boolean, state?: string): Promise<any>; | ||
getLoginUrl(state?: string): Promise<string>; | ||
getLoginBody(state?: string): Promise<any>; | ||
/** | ||
@@ -48,0 +48,0 @@ * @inheritdoc |
@@ -39,12 +39,10 @@ import { ObeliskConfig, Tokens } from './types'; | ||
* Returns the login url as a promise. Use this url to login. | ||
* @param rememberMe Remember your auth session over an extended period of time. | ||
* @param state A state paramters that will be returned to the registered redirectUri after logging in. | ||
*/ | ||
getLoginUrl(rememberMe: boolean, state?: string): Promise<string>; | ||
getLoginUrl(state?: string): Promise<string>; | ||
/** | ||
* Returns the required login body as a promise. Use this body to post a login. | ||
* @param rememberMe Remember your auth session over an extended period of time. | ||
* @param state A state paramters that will be returned to the registered redirectUri after logging in. | ||
*/ | ||
getLoginBody(rememberMe: boolean, state?: string): Promise<any>; | ||
getLoginBody(state?: string): Promise<any>; | ||
/** | ||
@@ -51,0 +49,0 @@ * Handler for detecting and exchanging an authorization code parameter in the querystring of the uri. |
@@ -342,3 +342,3 @@ var AuthEventType; | ||
*/ | ||
ObeliskAuthClient.prototype.getLoginUrl = function (rememberMe, state) { | ||
ObeliskAuthClient.prototype.getLoginUrl = function (state) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
@@ -360,3 +360,3 @@ var queryFields, _a, _b, query; | ||
_a.code_challenge_method = 'S256', | ||
_a.remember_me = rememberMe, | ||
// remember_me: rememberMe, | ||
_a.state = state || encodeURIComponent(btoa('/')), | ||
@@ -372,3 +372,3 @@ _a); | ||
}; | ||
ObeliskAuthClient.prototype.getLoginBody = function (rememberMe, state) { | ||
ObeliskAuthClient.prototype.getLoginBody = function (state) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
@@ -389,3 +389,3 @@ var queryFields, _a; | ||
_a.code_challenge_method = 'S256', | ||
_a.remember_me = rememberMe, | ||
// remember_me: rememberMe, | ||
_a.state = state || encodeURIComponent(btoa('/')), | ||
@@ -392,0 +392,0 @@ _a); |
@@ -345,3 +345,3 @@ 'use strict'; | ||
*/ | ||
ObeliskAuthClient.prototype.getLoginUrl = function (rememberMe, state) { | ||
ObeliskAuthClient.prototype.getLoginUrl = function (state) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
@@ -363,3 +363,3 @@ var queryFields, _a, _b, query; | ||
_a.code_challenge_method = 'S256', | ||
_a.remember_me = rememberMe, | ||
// remember_me: rememberMe, | ||
_a.state = state || encodeURIComponent(btoa('/')), | ||
@@ -375,3 +375,3 @@ _a); | ||
}; | ||
ObeliskAuthClient.prototype.getLoginBody = function (rememberMe, state) { | ||
ObeliskAuthClient.prototype.getLoginBody = function (state) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
@@ -392,3 +392,3 @@ var queryFields, _a; | ||
_a.code_challenge_method = 'S256', | ||
_a.remember_me = rememberMe, | ||
// remember_me: rememberMe, | ||
_a.state = state || encodeURIComponent(btoa('/')), | ||
@@ -395,0 +395,0 @@ _a); |
{ | ||
"name": "@obelisk/auth", | ||
"version": "1.7.0", | ||
"version": "2.0.0", | ||
"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
146690
-0.63%1119
-0.18%