Skip to content

Commit

Permalink
docs: Add note on popup blocking
Browse files Browse the repository at this point in the history
  • Loading branch information
soofstad committed Oct 23, 2024
1 parent 3fbb90e commit e963804
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit e963804

Please sign in to comment.