This client application is a basic React sample demonstrating how to integrate with Authlete Authorization Server. It utilizes react-oidc-context library for OIDC authentication/authorization and implements authorization_code flow with PKCE to interact with Authlete.
The Authlete server can be integrated with any authentication provider. This sample demonstrates how to work with SuperTokens for authentication. Upon successful authentication, the sample obtains an access token from Authlete and displays authenticated views.
- React: JavaScript library for building user interfaces.
- react-oidc-context: React library for OIDC authentication/authorization.
- shadcn: Shadcn Component library for UI components.
- Tailwind CSS: Utility-first CSS framework for styling.
To run the client application locally, follow these steps:
- Clone the repository.
- Navigate to the project directory and update Authlete configuration in
index.tsx
const oidcConfig = {
authority: "https://localhost",
client_id: "180418741236156",
redirect_uri: window.location.href,
onSigninCallback: async () => {
window.history.replaceState(
{},
document.title,
window.location.pathname
)
}
}
- Install dependencies using
npm install
- Run the application using
npm run dev
- Access the application in your browser.
- Authenticate using the provided authentication flow.
- Upon successful authentication, navigate through the authenticated views to see the functionality.
demo.mp4
In the future, the sample will be extended to include the following features:
- Calling an API protected with Authlete.
Feel free to contribute to the project or suggest enhancements!
This project is licensed under the MIT License. See the LICENSE file for details.