Lightweight auth library based on oidc-client for React single page applications (SPA). Support for hooks and higher-order components (HOC).

Overview

react-oidc-context

Stable Release Pipeline

Lightweight auth library using the oidc-client library for React single page applications (SPA). Support for hooks and higher-order components (HOC).

Table of Contents

Documentation

This library implements an auth context provider by making use of the oidc-client library. Its configuration is tight coupled to that library.

The User and UserManager is hold in this context, which is accessible from the React application. Additionally it intercepts the auth redirects by looking at the query/fragment parameters and acts accordingly. You still need to setup a redirect uri, which must point to your application, but you do not need to create that route.

Installation

Using npm

npm install react-oidc-context

Getting Started

Configure the library by wrapping your application in AuthProvider:

, client_id: , redirect_uri: , ... } ReactDOM.render( , document.getElementById("app") ) ">
// src/index.jsx
import React from "react"
import ReactDOM from "react-dom"
import { AuthProvider } from "react-oidc-context"
import App from "./App"

const oidcConfig = {
    authority: <your authority>,
    client_id: <your client id>,
    redirect_uri: <your redirect uri>,
    ...
}

ReactDOM.render(
    <AuthProvider {...oidcConfig}>
        <App />
    </AuthProvider>,
    document.getElementById("app")
)

Use the useAuth hook in your components to access authentication state (isLoading, isAuthenticated and user) and authentication methods (signinRedirect, removeUser and signOutRedirect):

Loading...
} if (auth.error) { return
Oops... {auth.error.message}
} if (auth.isAuthenticated) { return (
Hello {auth.user?.profile.sub}{" "}
) } return } export default App ">
// src/App.jsx
import React from "react"
import { useAuth } from "react-oidc-context"

function App() {
    const auth = useAuth()

    if (auth.isLoading) {
        return <div>Loading...</div>
    }

    if (auth.error) {
        return <div>Oops... {auth.error.message}</div>
    }

    if (auth.isAuthenticated) {
        return (
            <div>
                Hello {auth.user?.profile.sub}{" "}
                <button onClick={auth.removeUser}>
                    Log out
                </button>
            </div>
        )
    }

    return <button onClick={auth.signinRedirect}>Log in</button>
}

export default App

Use with a Class Component

Use the withAuth higher-order component to add the auth property to class components:

Hello {auth.user?.profile.sub}
} } export default withAuth(Profile) ">
// src/Profile.jsx
import React from "react"
import { withAuth } from "react-oidc-context"

class Profile extends React.Component {
    render() {
        // `this.props.auth` has all the same properties as the `useAuth` hook
        const auth = this.props.auth
        return <div>Hello {auth.user?.profile.sub}</div>
    }
}

export default withAuth(Profile)

Call a protected API

As a child of AuthProvider with a user containing an access token:

{ const auth = useAuth() const [posts, setPosts] = useState(null) React.useEffect(() => { (async () => { try { const token = auth.user?.access_token const response = await fetch("https://api.example.com/posts", { headers: { Authorization: `Bearer ${token}`, }, }) setPosts(await response.json()) } catch (e) { console.error(e) } })() }, [auth]) if (!posts) { return
Loading...
} return (
    {posts.map((post, index) => { return
  • {post}
  • })}
) } export default Posts ">
// src/Posts.jsx
import React from "react"
import { useAuth } from "react-oidc-context"

const Posts = () => {
    const auth = useAuth()
    const [posts, setPosts] = useState(null)

    React.useEffect(() => {
        (async () => {
            try {
                const token = auth.user?.access_token
                const response = await fetch("https://api.example.com/posts", {
                    headers: {
                        Authorization: `Bearer ${token}`,
                    },
                })
                setPosts(await response.json())
            } catch (e) {
                console.error(e)
            }
        })()
    }, [auth])

    if (!posts) {
        return <div>Loading...</div>
    }

    return (
        <ul>
            {posts.map((post, index) => {
                return <li key={index}>{post}</li>
            })}
        </ul>
    )
}

export default Posts

As not a child of AuthProvider (e.g. redux slice) when using local storage (WebStorageStateStore) for the user containing an access token:

: `) if (!oidcStorage) { return null } return User.fromStorageString(oidcStorage) } export const getPosts = createAsyncThunk( "store/getPosts", async () => { const user = getUser() const token = user?.access_token return fetch("https://api.example.com/posts", { headers: { Authorization: `Bearer ${token}`, }, }) }, ... ) ">
// src/slice.js
import { User } from "oidc-client"

function getUser() {
    const oidcStorage = localStorage.getItem(`oidc.user:
    
     :
     
      `
     
    )
    if (!oidcStorage) {
        return null
    }

    return User.fromStorageString(oidcStorage)
}

export const getPosts = createAsyncThunk(
    "store/getPosts",
    async () => {
        const user = getUser()
        const token = user?.access_token
        return fetch("https://api.example.com/posts", {
            headers: {
                Authorization: `Bearer ${token}`,
            },
        })
    },
    ...
)

Contributing

We appreciate feedback and contribution to this repo!

Influences

This library is inspired by oidc-react, which lacks error handling and auth0-react, which is focued on auth0.

License

This project is licensed under the MIT license. See the LICENSE file for more info.

Comments
  • Attempted import error: 'UserManager' is not exported from 'oidc-client-ts'.

    Attempted import error: 'UserManager' is not exported from 'oidc-client-ts'.

    When using the react-oidc-context library v2.0.0.beta.1 in a project:

    ./node_modules/react-oidc-context/dist/react-oidc-context.mjs Attempted import error: 'UserManager' is not exported from 'oidc-client-ts'.

    bug 
    opened by pamapa 13
  • unclear how to sign out without hooks

    unclear how to sign out without hooks

    Our project was using AppAuth-JS library before discovering this. It is much more succinct and sensible so thank you.

    One of the challenges faced in using this library: we are using Apollo client to make GraphQL requests and we use a link to detect 401 errors. From the link, it's not clear how one could trigger a signout redirect. Thus, as a workaround, a boolean flag needsSignoutRedirect was created in our redux store which gets picked up by a React hook which performs the signout.

    How can one halt all rendering while the page redirects though? If the network error reaches the query hook, the page will display an error message momentarily. Throwing an error in the link and catching it in the error boundary in order to halt the rendering cycles could prevent the hook from catching the needsSignoutRedirect flag.

    question 
    opened by justin-barca-at-camis 12
  • Completing login after signInRedirect

    Completing login after signInRedirect

    Hi,

    We are trying to switch to this library instead of vanilla oidc-client.

    In our previous implementation, after calling signInRedirectwhen the authentication is returned, our redirect_url page contains code that will complete the login by calling userManager.signinRedirectCallback() which completes the authentication by exchanging the authorization code for an access token.

    I can't find an example of how this is done in the library.

    I would also like to know if this library handles silentRenewal and how to implement.

    question 
    opened by elfico 12
  • expose userManager prop on AuthProvider

    expose userManager prop on AuthProvider

    exposes a userManager prop that can be passed in. Allows users to control the userManager in memory and invoke it in static contexts

    Closes/fixes https://github.com/authts/react-oidc-context/issues/313 https://github.com/authts/react-oidc-context/issues/331 https://github.com/authts/react-oidc-context/issues/490

    Checklist

    • [x] This PR makes changes to the public API
    • [x] I have included links for closing relevant issue numbers
    opened by rahul-sharma-uipath 11
  • make sure signinCallback is only called once in React.StrictMode

    make sure signinCallback is only called once in React.StrictMode

    Ensure parsing the window.location is only done once, when using React.StrictMode.

    ~~I am not 100% sure if we need the additional guard for the event registering at all.~~ For event registering the cleanup function takes care...

    Unit tests: The new test case uses @testing-library/react, which is the new way to test. The other test cases still use @testing-library/react-hooks, which should a some point be ported too. Not urgent and not in this MR. Just a technical dept (#433).

    Closes/fixes #401

    Fix according do documentation: https://github.com/reactwg/react-18/discussions/18

    Checklist

    • [ ] This PR makes changes to the public API
    • [x] I have included links for closing relevant issue numbers
    opened by pamapa 9
  • Automatic sign-in

    Automatic sign-in

    The base example in the README displays a log in button when you launch the app.

    This is not how most apps work, and it probably should be updated to something more common.

    Most apps will silently and automatically reestablish your previous session, if you close the tab and reopen the app.

    I have not been able to achieve that react-oidc-context - I only seem to get myself into infinite circular logins.

    I'm coming from oidc-react, which would automatically take care of this. (but which I have other problems with - namely, silent renewals do not seem to work correctly, which you seem to have given more consideration to.)

    ~~With this library, it looks like I have to manually call a function like signinSilent or signinRedirect to make it work?~~

    EDIT: it turns out signinRedirect might either redirect or just silently resume a prior session, if possible - just the function name is a little misleading here.

    I'm really missing a better example here, please.

    I'm sure others have gotten this to work? It seems the package is very popular, and I doubt everyone is using the example from the README, making their users manually sign in every time they visit the page? 🙂

    documentation question 
    opened by mindplay-dk 8
  • refactor: use renderHook from @testing-library/react

    refactor: use renderHook from @testing-library/react

    Closes/fixes: #431.

    This PR is a follow-up of the PR #421, in which was decided that it would be nice to refactor all tests to use the @testing-library/react exclusively.

    Checklist

    • [ ] This PR makes changes to the public API
    • [x] I have included links for closing relevant issue numbers
    opened by mariusflorescu 8
  • Documentation on how to enable `state` parameter

    Documentation on how to enable `state` parameter

    Hi Team,

    We're trying to determine if state OAuth2 parameter can be auto-generated and verified by this library, or if this is something that the client should implement on their own. Do you have any clarifying documentation on it?

    Thank you

    question 
    opened by dinvlad 6
  • User logout at the end of the session

    User logout at the end of the session

    Hi,

    when activating monitorSession on UserManagerSettings an iframe is created to check the session and trigger events if the session is closed (it's the OIDC Session Management). The AuthProvider hides the UserManager instance and therefore the events. It would be great to provide access to these events or to implement addUserSignedOut in order to enable Single Logout.

    userManager.events.addUserSignedOut(async () => {
      console.log('OP session close: user signed out...')
      userManager.signoutRedirect()
    })
    
    enhancement 
    opened by ncarlier 6
  • I want to prevent the data to be stored in the session storage

    I want to prevent the data to be stored in the session storage

    Hello, I am facing an issue where after the user logged in using IdentityServer 4, he will be redirected to the react application and the data will be stored in session storage. I only want to receive access token from the server and to be stored in cookies as http only Can someone help me?

    The following image is what I dont want it to be like that. image

    question 
    opened by SirMajed 5
  • How to get custom claims included in JWT

    How to get custom claims included in JWT

    I am getting a JWT token that includes a custom field in the payload called name. When I view the results of useAuth(), stored in a variable called auth, I can see the user object which contains the profile object where I would expect the name to be, except the name field is not there. When I decrypt the token stored in auth I can see the name field just fine. Am I supposed to access the name using a different method other than auth.user.profile.name?

    An example of how the payload is setup is

    {
        "name": "John Doe",
        ...
    }
    
    question 
    opened by meyerscolton 5
  • build(deps-dev): bump @typescript-eslint/parser from 5.40.0 to 5.48.0

    build(deps-dev): bump @typescript-eslint/parser from 5.40.0 to 5.48.0

    Bumps @typescript-eslint/parser from 5.40.0 to 5.48.0.

    Release notes

    Sourced from @​typescript-eslint/parser's releases.

    v5.48.0

    5.48.0 (2023-01-02)

    Bug Fixes

    Features

    • eslint-plugin: specify which method is unbound and added test case (#6281) (cf3ffdd)

    v5.47.1

    5.47.1 (2022-12-26)

    Bug Fixes

    • ast-spec: correct some incorrect ast types (#6257) (0f3f645)
    • eslint-plugin: [member-ordering] correctly invert optionalityOrder (#6256) (ccd45d4)

    v5.47.0

    5.47.0 (2022-12-19)

    Features

    • eslint-plugin: [no-floating-promises] add suggestion fixer to add an 'await' (#5943) (9e35ef9)

    v5.46.1

    5.46.1 (2022-12-12)

    Note: Version bump only for package @​typescript-eslint/typescript-eslint

    v5.46.0

    5.46.0 (2022-12-08)

    Bug Fixes

    • eslint-plugin: [ban-types] update message to suggest object instead of Record<string, unknown> (#6079) (d91a5fc)

    Features

    • eslint-plugin: [prefer-nullish-coalescing] logic and test for strict null checks (#6174) (8a91cbd)

    v5.45.1

    5.45.1 (2022-12-05)

    ... (truncated)

    Changelog

    Sourced from @​typescript-eslint/parser's changelog.

    5.48.0 (2023-01-02)

    Note: Version bump only for package @​typescript-eslint/parser

    5.47.1 (2022-12-26)

    Note: Version bump only for package @​typescript-eslint/parser

    5.47.0 (2022-12-19)

    Note: Version bump only for package @​typescript-eslint/parser

    5.46.1 (2022-12-12)

    Note: Version bump only for package @​typescript-eslint/parser

    5.46.0 (2022-12-08)

    Note: Version bump only for package @​typescript-eslint/parser

    5.45.1 (2022-12-05)

    Bug Fixes

    • parser: remove the jsx option requirement for automatic jsx pragma resolution (#6134) (e777f5e)

    5.45.0 (2022-11-28)

    Note: Version bump only for package @​typescript-eslint/parser

    5.44.0 (2022-11-21)

    Note: Version bump only for package @​typescript-eslint/parser

    5.43.0 (2022-11-14)

    Note: Version bump only for package @​typescript-eslint/parser

    5.42.1 (2022-11-07)

    Note: Version bump only for package @​typescript-eslint/parser

    5.42.0 (2022-10-31)

    Features

    Reverts

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • build(deps-dev): bump @typescript-eslint/eslint-plugin from 5.40.0 to 5.48.0

    build(deps-dev): bump @typescript-eslint/eslint-plugin from 5.40.0 to 5.48.0

    Bumps @typescript-eslint/eslint-plugin from 5.40.0 to 5.48.0.

    Release notes

    Sourced from @​typescript-eslint/eslint-plugin's releases.

    v5.48.0

    5.48.0 (2023-01-02)

    Bug Fixes

    Features

    • eslint-plugin: specify which method is unbound and added test case (#6281) (cf3ffdd)

    v5.47.1

    5.47.1 (2022-12-26)

    Bug Fixes

    • ast-spec: correct some incorrect ast types (#6257) (0f3f645)
    • eslint-plugin: [member-ordering] correctly invert optionalityOrder (#6256) (ccd45d4)

    v5.47.0

    5.47.0 (2022-12-19)

    Features

    • eslint-plugin: [no-floating-promises] add suggestion fixer to add an 'await' (#5943) (9e35ef9)

    v5.46.1

    5.46.1 (2022-12-12)

    Note: Version bump only for package @​typescript-eslint/typescript-eslint

    v5.46.0

    5.46.0 (2022-12-08)

    Bug Fixes

    • eslint-plugin: [ban-types] update message to suggest object instead of Record<string, unknown> (#6079) (d91a5fc)

    Features

    • eslint-plugin: [prefer-nullish-coalescing] logic and test for strict null checks (#6174) (8a91cbd)

    v5.45.1

    5.45.1 (2022-12-05)

    ... (truncated)

    Changelog

    Sourced from @​typescript-eslint/eslint-plugin's changelog.

    5.48.0 (2023-01-02)

    Features

    • eslint-plugin: specify which method is unbound and added test case (#6281) (cf3ffdd)

    5.47.1 (2022-12-26)

    Bug Fixes

    • ast-spec: correct some incorrect ast types (#6257) (0f3f645)
    • eslint-plugin: [member-ordering] correctly invert optionalityOrder (#6256) (ccd45d4)

    5.47.0 (2022-12-19)

    Features

    • eslint-plugin: [no-floating-promises] add suggestion fixer to add an 'await' (#5943) (9e35ef9)

    5.46.1 (2022-12-12)

    Note: Version bump only for package @​typescript-eslint/eslint-plugin

    5.46.0 (2022-12-08)

    Bug Fixes

    • eslint-plugin: [ban-types] update message to suggest object instead of Record<string, unknown> (#6079) (d91a5fc)

    Features

    • eslint-plugin: [prefer-nullish-coalescing] logic and test for strict null checks (#6174) (8a91cbd)

    5.45.1 (2022-12-05)

    Bug Fixes

    • eslint-plugin: [keyword-spacing] unexpected space before/after in import type (#6095) (98caa92)
    • eslint-plugin: [no-shadow] add call and method signatures to ignoreFunctionTypeParameterNameValueShadow (#6129) (9d58b6b)
    • eslint-plugin: [prefer-optional-chain] collect MetaProperty type (#6083) (d7114d3)
    • eslint-plugin: [sort-type-constituents, sort-type-union-intersection-members] handle some required parentheses cases in the fixer (#6118) (5d49d5d)

    5.45.0 (2022-11-28)

    Bug Fixes

    • eslint-plugin: [array-type] --fix flag removes parentheses from type (#5997) (42b33af)
    • eslint-plugin: [keyword-spacing] prevent crash on no options (#6073) (1f19998)
    • eslint-plugin: [member-ordering] support private fields (#5859) (f02761a)
    • eslint-plugin: [prefer-readonly] report if a member's property is reassigned (#6043) (6e079eb)

    ... (truncated)

    Commits
    • 4ab9bd7 chore: publish v5.48.0
    • cf3ffdd feat(eslint-plugin): specify which method is unbound and added test case (#6281)
    • 6ffce79 chore: publish v5.47.1
    • 0f3f645 fix(ast-spec): correct some incorrect ast types (#6257)
    • ccd45d4 fix(eslint-plugin): [member-ordering] correctly invert optionalityOrder (#6256)
    • a2c08ba chore: publish v5.47.0
    • 9e35ef9 feat(eslint-plugin): [no-floating-promises] add suggestion fixer to add an 'a...
    • 6b3ed1d docs: fixed typo "foo.property" (#6180)
    • c943b84 chore: publish v5.46.1
    • 47241bb docs: overhaul branding and add new logo (#6147)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • build(deps-dev): bump eslint from 8.25.0 to 8.31.0

    build(deps-dev): bump eslint from 8.25.0 to 8.31.0

    Bumps eslint from 8.25.0 to 8.31.0.

    Release notes

    Sourced from eslint's releases.

    v8.31.0

    Features

    • 52c7c73 feat: check assignment patterns in no-underscore-dangle (#16693) (Milos Djermanovic)
    • b401cde feat: add options to check destructuring in no-underscore-dangle (#16006) (Morten Kaltoft)
    • 30d0daf feat: group properties with values in parentheses in key-spacing (#16677) (Francesco Trotta)

    Bug Fixes

    • 35439f1 fix: correct syntax error in prefer-arrow-callback autofix (#16722) (Francesco Trotta)
    • 87b2470 fix: new instance of FlatESLint should load latest config file version (#16608) (Milos Djermanovic)

    Documentation

    • 4339dc4 docs: Update README (GitHub Actions Bot)
    • 4e4049c docs: optimize code block structure (#16669) (Sam Chen)
    • 54a7ade docs: do not escape code blocks of formatters examples (#16719) (Sam Chen)
    • e5ecfef docs: Add function call example for no-undefined (#16712) (Elliot Huffman)
    • a3262f0 docs: Add mastodon link (#16638) (Amaresh S M)
    • a14ccf9 docs: clarify files property (#16709) (Sam Chen)
    • 3b29eb1 docs: fix npm link (#16710) (Abdullah Osama)
    • a638673 docs: fix search bar focus on Esc (#16700) (Shanmughapriyan S)
    • f62b722 docs: country flag missing in windows (#16698) (Shanmughapriyan S)
    • 4d27ec6 docs: display zh-hans in the docs language switcher (#16686) (Percy Ma)
    • 8bda20e docs: remove manually maintained anchors (#16685) (Percy Ma)
    • b68440f docs: User Guide Getting Started expansion (#16596) (Ben Perlmutter)

    Chores

    • 65d4e24 chore: Upgrade @​eslint/eslintrc@​1.4.1 (#16729) (Brandon Mills)
    • 8d93081 chore: fix CI failure (#16721) (Sam Chen)
    • 8f17247 chore: Set up automatic updating of README (#16717) (Nicholas C. Zakas)
    • 4cd87cb ci: bump actions/stale from 6 to 7 (#16713) (dependabot[bot])
    • fd20c75 chore: sort package.json scripts in alphabetical order (#16705) (Darius Dzien)
    • 10a5c78 chore: update ignore patterns in eslint.config.js (#16678) (Milos Djermanovic)

    v8.30.0

    Features

    • 075ef2c feat: add suggestion for no-return-await (#16637) (Daniel Bartholomae)
    • 7190d98 feat: update globals (#16654) (Sébastien Règne)

    Bug Fixes

    • 1a327aa fix: Ensure flat config unignores work consistently like eslintrc (#16579) (Nicholas C. Zakas)
    • 9b8bb72 fix: autofix recursive functions in no-var (#16611) (Milos Djermanovic)

    Documentation

    • 6a8cd94 docs: Clarify Discord info in issue template config (#16663) (Nicholas C. Zakas)
    • ad44344 docs: CLI documentation standardization (#16563) (Ben Perlmutter)
    • 293573e docs: fix broken line numbers (#16606) (Sam Chen)
    • fa2c64b docs: use relative links for internal links (#16631) (Percy Ma)
    • 75276c9 docs: reorder options in no-unused-vars (#16625) (Milos Djermanovic)
    • 7276fe5 docs: Fix anchor in URL (#16628) (Karl Horky)
    • 6bef135 docs: don't apply layouts to html formatter example (#16591) (Tanuj Kanti)
    • dfc7ec1 docs: Formatters page updates (#16566) (Ben Perlmutter)

    ... (truncated)

    Changelog

    Sourced from eslint's changelog.

    v8.31.0 - December 31, 2022

    • 65d4e24 chore: Upgrade @​eslint/eslintrc@​1.4.1 (#16729) (Brandon Mills)
    • 35439f1 fix: correct syntax error in prefer-arrow-callback autofix (#16722) (Francesco Trotta)
    • 87b2470 fix: new instance of FlatESLint should load latest config file version (#16608) (Milos Djermanovic)
    • 8d93081 chore: fix CI failure (#16721) (Sam Chen)
    • 4339dc4 docs: Update README (GitHub Actions Bot)
    • 8f17247 chore: Set up automatic updating of README (#16717) (Nicholas C. Zakas)
    • 4e4049c docs: optimize code block structure (#16669) (Sam Chen)
    • 54a7ade docs: do not escape code blocks of formatters examples (#16719) (Sam Chen)
    • 52c7c73 feat: check assignment patterns in no-underscore-dangle (#16693) (Milos Djermanovic)
    • e5ecfef docs: Add function call example for no-undefined (#16712) (Elliot Huffman)
    • a3262f0 docs: Add mastodon link (#16638) (Amaresh S M)
    • 4cd87cb ci: bump actions/stale from 6 to 7 (#16713) (dependabot[bot])
    • a14ccf9 docs: clarify files property (#16709) (Sam Chen)
    • 3b29eb1 docs: fix npm link (#16710) (Abdullah Osama)
    • fd20c75 chore: sort package.json scripts in alphabetical order (#16705) (Darius Dzien)
    • a638673 docs: fix search bar focus on Esc (#16700) (Shanmughapriyan S)
    • f62b722 docs: country flag missing in windows (#16698) (Shanmughapriyan S)
    • 4d27ec6 docs: display zh-hans in the docs language switcher (#16686) (Percy Ma)
    • 8bda20e docs: remove manually maintained anchors (#16685) (Percy Ma)
    • b401cde feat: add options to check destructuring in no-underscore-dangle (#16006) (Morten Kaltoft)
    • b68440f docs: User Guide Getting Started expansion (#16596) (Ben Perlmutter)
    • 30d0daf feat: group properties with values in parentheses in key-spacing (#16677) (Francesco Trotta)
    • 10a5c78 chore: update ignore patterns in eslint.config.js (#16678) (Milos Djermanovic)

    v8.30.0 - December 16, 2022

    • f2c4737 chore: upgrade @​eslint/eslintrc@​1.4.0 (#16675) (Milos Djermanovic)
    • 1a327aa fix: Ensure flat config unignores work consistently like eslintrc (#16579) (Nicholas C. Zakas)
    • 075ef2c feat: add suggestion for no-return-await (#16637) (Daniel Bartholomae)
    • ba74253 chore: standardize npm script names per #14827 (#16315) (Patrick McElhaney)
    • 6a8cd94 docs: Clarify Discord info in issue template config (#16663) (Nicholas C. Zakas)
    • 0d9af4c ci: fix npm v9 problem with file: (#16664) (Milos Djermanovic)
    • 7190d98 feat: update globals (#16654) (Sébastien Règne)
    • ad44344 docs: CLI documentation standardization (#16563) (Ben Perlmutter)
    • 90c9219 refactor: migrate off deprecated function-style rules in all tests (#16618) (Bryan Mishkin)
    • 9b8bb72 fix: autofix recursive functions in no-var (#16611) (Milos Djermanovic)
    • 293573e docs: fix broken line numbers (#16606) (Sam Chen)
    • fa2c64b docs: use relative links for internal links (#16631) (Percy Ma)
    • 75276c9 docs: reorder options in no-unused-vars (#16625) (Milos Djermanovic)
    • 7276fe5 docs: Fix anchor in URL (#16628) (Karl Horky)
    • 6bef135 docs: don't apply layouts to html formatter example (#16591) (Tanuj Kanti)
    • dfc7ec1 docs: Formatters page updates (#16566) (Ben Perlmutter)
    • 8ba124c docs: update the prefer-const example (#16607) (Pavel)
    • e6cb05a docs: fix css leaking (#16603) (Sam Chen)

    v8.29.0 - December 2, 2022

    • 0311d81 docs: Configuring Plugins page intro, page tweaks, and rename (#16534) (Ben Perlmutter)

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • build(deps-dev): bump typescript from 4.8.4 to 4.9.4

    build(deps-dev): bump typescript from 4.8.4 to 4.9.4

    Bumps typescript from 4.8.4 to 4.9.4.

    Release notes

    Sourced from typescript's releases.

    TypeScript 4.9.4

    For release notes, check out the release announcement.

    For the complete list of fixed issues, check out the

    Downloads are available on:

    Changes:

    • e2868216f637e875a74c675845625eb15dcfe9a2 Bump version to 4.9.4 and LKG.
    • eb5419fc8d980859b98553586dfb5f40d811a745 Cherry-pick #51704 to release 4.9 (#51712)
    • b4d382b9b12460adf2da4cc0d1429cf19f8dc8be Cherry-pick changes for narrowing to tagged literal types.
    • e7a02f43fce47e1a39259ada5460bcc33c8e98b5 Port of #51626 and #51689 to release-4.9 (#51627)
    • 1727912f0437a7f367d90040fc4b0b4f3efd017a Cherry-pick fix around visitEachChild to release-4.9. (#51544)

    This list of changes was auto generated.

    TypeScript 4.9

    For release notes, check out the release announcement.

    Downloads are available on:

    Changes:

    • 93bd577458d55cd720b2677705feab5c91eb12ce Bump version to 4.9.3 and LKG.
    • 107f832b80df2dc97748021cb00af2b6813db75b Update LKG.
    • 31bee5682df130a14ffdd5742f994dbe7313dd0e Cherry-pick PR #50977 into release-4.9 (#51363) [ #50872 ]
    • 1e2fa7ae15f8530910fef8b916ec8a4ed0b59c45 Update version to 4.9.2-rc and LKG.
    • 7ab89e5c6e401d161f31f28a6c555a3ba530910e Merge remote-tracking branch 'origin/main' into release-4.9
    • e5cd686defb1a4cbdb36bd012357ba5bed28f371 Update package-lock.json
    • 8d40dc15d1b9945837e7860320fdccfe27c40cad Update package-lock.json
    • 5cfb3a2fe344a5350734305193e6cc99516285ca Only call return() for an abrupt completion in user code (#51297)
    • a7a9d158e817fcb0e94dc1c24e0a401b21be0cc9 Fix for broken baseline in yieldInForInInDownlevelGenerator (#51345)
    • 7f8426f4df0d0a7dd8b72079dafc3e60164a23b1 fix for-in enumeration containing yield in generator (#51295)
    • 3d2b4017eb6b9a2b94bc673291e56ae95e8beddd Fix assertion functions accessed via wildcard imports (#51324)
    • 64d0d5ae140b7b26a09e75114517b418d6bcaa9f fix(51301): Fixing an unused import at the end of a line removes the newline (#51320)
    • 754eeb2986bde30d5926e0fa99c87dda9266d01b Update CodeQL workflow and configuration, fix found bugs (#51263)
    • d8aad262006ad2d2c91aa7a0e4449b4b83c57f7b Update package-lock.json
    • d4f26c840b1db76c0b25a405c8e73830a2b45cbc fix(51245): Class with parameter decorator in arrow function causes "convert to default export" refactoring failure (#51256)
    • 16faf45682173ea437a50330feb4785578923d7f Update package-lock.json
    • 8b1ecdb701e2a2e19e9f8bcdd6b2beac087eabee fix(50654): "Move to a new file" breaks the declaration of referenced variable (#50681)
    • 170a17fad57eae619c5ef2b7bdb3ac00d6c32c47 Dom update 2022-10-25 (#51300)

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Include redirect_uri query parameter in silent refresh?

    Include redirect_uri query parameter in silent refresh?

    I am trying to use react-oidc-context to login with Azure AD B2C. The login works as expected, but I cannot get the silent refresh to work. Before the access token expires, the library sends a request to the auth endpoint including the refresh_token. But Azure AD B2C also requires that you include the redirect_uri again in the query parameters. I get the following error response: AADB2C90083: The request is missing required parameter: redirect_uri.

    Is there a way I can control, that this parameter gets included in the silent refresh call? I looked through the documentation and couldn't find a suitable configuration setting, that would take care of that. I tried setting the extraQueryParams property in the oidcConfig object, but that will lead to the redirect_uri parameter ending up twice in the initial login request and still isn't included in the silent refresh call.

    If it is not possible to adapt the silent refresh in that way. What would be my options implementing the token refresh myself?

    question 
    opened by n0rwin 3
Releases(v2.2.0)
Owner
null
Combine single-spa with module federation

single-spa-mf combine single-spa with module federation API import { registerApp

yiminghe 4 Aug 5, 2022
A Single Page Application Of Nike Built With React

Projeto Nike React Desde já, gostaria de salientar que este projeto foi feito ap

null 1 Apr 8, 2022
Calypso is the new WordPress.com front-end – a beautiful redesign of the WordPress dashboard using a single-page web application

Calypso is the new WordPress.com front-end – a beautiful redesign of the WordPress dashboard using a single-page web application, powered by the WordPress.com REST API. Calypso is built for reading, writing, and managing all of your WordPress sites in one place.

Automattic 12.2k Dec 30, 2022
A single page application that allows people to donate money.

This application was written in ReactJS. This is a SINGLE PAGE APPLICATION(SPA) that uses Pay On API to collect donation from users.Users can only make donations once in every hour

Ayeni Olusegun 19 Jul 18, 2022
Single Page Resume Builder

Free and open source, fully customizable professional single page resume builder

Deepanshu Tiwari 9 Dec 18, 2022
Auth Service sample source. It supports Solana and EVM-compatiable chains

This repository is Auth Service sample source. It supports Solana and EVM-compatiable chains, more chains and more features coming soon! Learn more visit Particle Network.

Particle Network 7 Aug 20, 2022
Auth model created by Using nodeJs for backend & reactJs for frontend with the help of TailwindCss in styling

The Universal Auth System Using The MERN Stack Including Mysql --> The project is divded to two separte projects 1- The Client side -> containing the

m.bebars 1 Aug 22, 2022
Solana Wallet Auth: A FullStack example

This example uses Solana's wallet adapter to sign messages and verifies their signatures on the backend, allowing for a lean way to authenticate users without the need for web2 credentials like email/password combinations or social providers, in this scenario all you have to do is connect your wallet and sign interaction messages to be properly authenticated.

Kevin Rodríguez 19 Dec 20, 2022
HTML meta tags for React-based apps. Works for both client- and server-side rendering, and has a strict but flexible API.

React Document Meta HTML meta tags for React-based apps. Works for both client- and server-side rendering, and has a strict but flexible API. Built wi

kodyl 320 Nov 18, 2022
:tada: React Universal Hooks : just use****** everywhere (Functional or Class Component). Support React DevTools!

react-universal-hooks React Universal Hooks : just use****** everywhere. Support React >= 16.8.0 Installation Using npm: $ npm install --save react-un

Salvatore Ravidà 177 Oct 10, 2022
We have updated our application over to using hooks and functional components to replace any class components we had before.

Crwn hooks We have updated our application over to using hooks and functional components to replace any class components we had before. How to fork an

Shazil Sattar 2 Feb 10, 2022
A lightweight react global state management library

Reate A lightweight react global state management library. ✨ Feature Simple and easy to use, only three APIs

青湛 19 Oct 26, 2021
A javascript microframework to shorten daily use CSS class manipulator methods by adding them all into a single method

CSS Class Builder A small typescript package built to work with ReactJS to short

Ankit Mishra 2 Jan 7, 2022
Keyborg is a library that tracks the state of current keyboard input on a web page through focus events.

Keyborg ⌨️ ?? Keyborg is a library that tracks the state of current keyboard input on a web page through focus events. It does not do anything invasiv

Microsoft 8 Nov 1, 2022
Facebook components like a Login button, Like, Share, Chat, Comments, Page or Embedded Post

React Facebook Components Components Facebook provider (provide settings to child components) Login button (provide user profile and signed request) L

Zlatko Fedor 740 Jan 3, 2023
An example using universal client/server routing and data in React with AWS DynamoDB

react-server-routing-example A simple (no compile) example of how to do universal server/browser rendering, routing and data fetching with React and A

Michael Hart 299 Dec 14, 2022
Execute Power FX in your client (React) via .NET (WASM) and JS interop.

WIP, details TBD Click here for live DEMO. Based on: https://github.com/microsoft/power-fx-host-samples/tree/main/Samples/WebDemo Blog post: https://h

NETWORG 10 Nov 16, 2022
Redux bindings for client-side search

redux-search Higher-order Redux library for searching collections of objects. Search algorithms powered by js-worker-search. Check out the live demo a

Brian Vaughn 1.4k Dec 16, 2022
Revolt client built with Preact

revolt This is the web client for Revolt, which is also available live at app.revolt.chat. Official screenshots of the client are available in this Go

REVOLT 8 Sep 26, 2021