Coder Social home page Coder Social logo

authlete-react-sample's Introduction

Authlete React Sample

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.

Overview

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.

Technologies Used

  • 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.

Installation

To run the client application locally, follow these steps:

  1. Clone the repository.
  2. 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
    )
  }
}
  1. Install dependencies using npm install
  2. Run the application using npm run dev

Usage

  1. Access the application in your browser.
  2. Authenticate using the provided authentication flow.
  3. Upon successful authentication, navigate through the authenticated views to see the functionality.

Demo

demo.mp4

Future Enhancements

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!

License

This project is licensed under the MIT License. See the LICENSE file for details.

authlete-react-sample's People

Contributors

zamd avatar

Stargazers

Peter Stromquist avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.