@jfront/oauth-context
Advanced tools
Comparing version 0.1.3 to 0.1.4
@@ -6,2 +6,13 @@ # Change Log | ||
## [0.1.4](https://github.com/Jepria/jfront-oauth/compare/@jfront/oauth-context@0.1.3...@jfront/oauth-context@0.1.4) (2020-09-08) | ||
### Bug Fixes | ||
* logout process ([41f89c2](https://github.com/Jepria/jfront-oauth/commit/41f89c244ab600df172dcc7c2f1a426d8d4ac6ec)) | ||
## [0.1.3](https://github.com/Jepria/jfront-oauth/compare/@jfront/oauth-context@0.1.2...@jfront/oauth-context@0.1.3) (2020-09-07) | ||
@@ -8,0 +19,0 @@ |
@@ -22,6 +22,6 @@ "use strict"; | ||
var OAuthContextProvider = function OAuthContextProvider(_ref) { | ||
var onAuthorizationRequest = _ref.onAuthorizationRequest, | ||
isOAuthCallback = _ref.isOAuthCallback, | ||
var isOAuthCallback = _ref.isOAuthCallback, | ||
getQueryParams = _ref.getQueryParams, | ||
getCurrentUrl = _ref.getCurrentUrl, | ||
forward = _ref.forward, | ||
redirect = _ref.redirect, | ||
@@ -73,3 +73,3 @@ onLogout = _ref.onLogout, | ||
if (authorizationUrl) { | ||
onAuthorizationRequest(authorizationUrl); | ||
redirect(authorizationUrl); | ||
} // eslint-disable-next-line react-hooks/exhaustive-deps | ||
@@ -89,3 +89,3 @@ | ||
if (result.token_type === "Bearer") { | ||
redirect(meta.currentPath); | ||
forward(meta.currentPath); | ||
dispatch((0, _oauthCore.tokenRequestSuccess)(result.access_token, result.expires_in, result.token_type, result.refresh_token)); | ||
@@ -92,0 +92,0 @@ } else { |
@@ -12,6 +12,6 @@ import React, { useReducer, useEffect } from "react"; | ||
var { | ||
onAuthorizationRequest, | ||
isOAuthCallback, | ||
getQueryParams, | ||
getCurrentUrl, | ||
forward, | ||
redirect, | ||
@@ -61,3 +61,3 @@ onLogout, | ||
if (authorizationUrl) { | ||
onAuthorizationRequest(authorizationUrl); | ||
redirect(authorizationUrl); | ||
} // eslint-disable-next-line react-hooks/exhaustive-deps | ||
@@ -77,3 +77,3 @@ | ||
if (result.token_type === "Bearer") { | ||
redirect(meta.currentPath); | ||
forward(meta.currentPath); | ||
dispatch(tokenRequestSuccess(result.access_token, result.expires_in, result.token_type, result.refresh_token)); | ||
@@ -80,0 +80,0 @@ } else { |
@@ -11,6 +11,6 @@ import React from "react"; | ||
export interface OAuthContextProps { | ||
onAuthorizationRequest: (authorizationUrl: string) => void; | ||
isOAuthCallback: () => boolean; | ||
getQueryParams: () => OAuthQueryParams; | ||
redirect: (url: string) => void; | ||
forward: (url: string) => void; | ||
getCurrentUrl: () => string; | ||
@@ -17,0 +17,0 @@ onLogout: (logoutUrl: string) => void; |
{ | ||
"name": "@jfront/oauth-context", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"license": "Apache-2.0", | ||
@@ -40,3 +40,3 @@ "repository": "https://github.com/Jepria/jfront-oauth", | ||
}, | ||
"gitHead": "07190351e6fee1545e4acb1fa925e0c538a655b5" | ||
"gitHead": "121965393b65ad594e43a07bbe15581bd1291f1a" | ||
} |
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
66880