From e963804ed1b339dc4d244ef1be04ad5c8ef94f35 Mon Sep 17 00:00:00 2001 From: Stig Ofstad Date: Wed, 23 Oct 2024 10:53:20 +0200 Subject: [PATCH] docs: Add note on popup blocking --- README.md | 2 ++ src/package.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c384012..28c56d3 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,7 @@ interface IAuthContext { tokenData?: TTokenData // Function to trigger login. // If you want to use 'state', you might want to set 'clearURL' configuration parameter to 'false'. + // Note that most browsers block popups by default. The library will print a warning and fallback to redirect if the popup is blocked logIn: (state?: string, additionalParameters?: { [key: string]: string | boolean | number }, method: 'redirect' | 'popup' = 'redirect') => void // Function to trigger logout from authentication provider. You may provide optional 'state', and 'logout_hint' values. // See https://openid.net/specs/openid-connect-rpinitiated-1_0.html#RPLogout for details. @@ -135,6 +136,7 @@ type TAuthConfig = { // user has been redirected back from the auth server postLogin?: () => void // default: () => null // Which method to use for login. Can be either 'redirect' or 'popup' + // Note that most browsers block popups by default. The library will print a warning and fallback to redirect if the popup is blocked loginMethod: 'redirect' | 'popup' // default: 'redirect' // Optional callback function for the 'refreshTokenExpired' event. // You likely want to display a message saying the user need to log in again. A page refresh is enough. diff --git a/src/package.json b/src/package.json index a262f98..9f40909 100644 --- a/src/package.json +++ b/src/package.json @@ -1,6 +1,6 @@ { "name": "react-oauth2-code-pkce", - "version": "1.21.1", + "version": "1.22.0", "description": "Provider agnostic react package for OAuth2 Authorization Code flow with PKCE", "main": "dist/index.js", "types": "dist/index.d.ts",