{"repo":"iad-os/react-ghost-auth","free":true,"listed":false,"github":"https://github.com/iad-os/react-ghost-auth","clone":"git clone https://github.com/iad-os/react-ghost-auth.git","description":"React Ghost Auth is an easy to use multi-provider authentication and authorization library. The library uses the OpenID Connect Flow.","language":"TypeScript","stars":11,"topics":["keycloak","oauth2","oauth2-client","open-id-connect","react","reactjs","relying-party","token","authentication","authorization"],"license":null,"category":"auth-billing-email","readme_excerpt":"React Ghost Auth React library for authentication and authorization based on OpenID Connect (OIDC) . It supports multiple providers (Google, Keycloak, Microsoft, etc.), Authorization Code flow with PKCE , in-memory token storage, and automatic token refresh. --- Installation Peer dependency: react = 16.14.0 --- Configuration OIDC Provider Each provider is a ProviderOptions object: Field Type Description ------- ------ ------------- issuer string OIDC issuer URL (e.g. https://auth.example.com/realms/my-realm ) name string Provider name (e.g. \"Keycloak\") client id string Application client ID client secret string (optional) Client secret (for confidential clients) redirect uri string Redirect URI after login redirect logout uri string Redirect URI after logout requested scopes string Requested scopes (e.g. openid profile email ) pkce boolean (optional) Use PKCE (recommended for SPAs) defualt boolean (optional) Default provider when issuer is not passed access type string (optional) e.g. offline for refresh token kc idp hint string (optional) Keycloak identity provider hint App config --- Usage 1. AuthenticationProvider Wrap your app (or the part that uses auth) with the provider and pass the config and callbacks. AuthenticationProvider props: Prop Type Default Description ------ ------ -------- ------------- config AuthenticationConfig required Config with the list of providers children ReactNode required App content onRoute (route, overrided) = void required Callback with the ","default_branch":null,"files":null,"tree":[],"storefront":"/r/iad-os","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/iad-os/react-ghost-auth/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}