GithubHelp home page GithubHelp logo

nipunibhagya / asgardeo-react-b2c-sample-app Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wso2/asgardeo-react-b2c-sample-app

0.0 1.0 0.0 2.91 MB

React sample web application to integrate with Asgardeo for B2C usecases

License: Apache License 2.0

JavaScript 72.70% CSS 24.37% HTML 2.93%

asgardeo-react-b2c-sample-app's Introduction

asgardeo-react-b2c-sample-app

React sample web application to integrate with Asgardeo for B2C usecases

๐Ÿ‘€ Live Deployment

A live preview of this demo is available at

  1. Vercel: https://asgardeo-react-sample-app.vercel.app
  2. Netlify: https://kaleidoscopic-medovik-1bf3fc.netlify.app

Features/ Capabilities

  • Sign up to Asgardeo as a new user
  • Sign In and Sign Out of the application
  • Home page with the references and guides
  • The user roles Manager and User.
    • Manager can view the Profile and API call pages
    • User can view the Profile page
  • User Profile to view and update details.
  • API call page to send an API call.
  • User can set up the preferred option for second factor authentication

Configure Asgardeo to integrate with your application

Create the application

  1. Access Asgardeo at https://console.asgardeo.io/ and log in.

  2. Click Applications in the left navigation menu.

  3. Create a new application

  • Select Single Page Application

Applications

  1. Fill the details and click Create.

Create application

Add Application Roles

  1. Navigate to User Management > Groups from the side panel
  2. Create a Group and add users

Add group

  1. Create a Role in the application

Add role

  1. Navigate to User Management > Roles from the side panel and assign the group to the role

Assign group

Application role

  1. Allow the application_roles attribute in the application

Application role attribute

Add Second Factor Authentication (Optional)

  1. Navigate to the Sign in methods of the application

  2. Add the second step authentication

Application signin method

๐Ÿš€ Getting Started

  1. Clone the repository.
git clone https://github.com/wso2/asgardeo-react-b2c-sample-app.git
  1. Install the dependencies.
npm install
  1. Update the values in the .env file based on your requirements.
# The port number on which the client application will run
PORT=3000

# The base URL of the server's API that the client application will communicate with
# E.g., http://localhost:5000
REACT_APP_API_ENDPOINT=<add-server-api-url>

# The client ID for the Asgardeo Single Page Application (SPA) app
REACT_APP_CLIENT_ID=<add-asgardeo-spa-app-client-id-here>

# The base URL for the client application
# E.g., http://localhost:3000
REACT_APP_CLIENT_BASE_URL=<add-client-app-base-url-here>

# The base URL for the Asgardeo organization's API
# E.g., https://api.asgardeo.io/t/your-org
REACT_APP_ASGARDEO_BASE_URL=<add-asgardeo-org-base-url-here>

# The sign-up URL for the Asgardeo organization
REACT_APP_SIGN_UP_URL=<asgardeo-sign-up-url>

# The application name for the Asgardeo application
REACT_APP_APPLICATION_NAME=<application-name>

# The organization name for the Asgardeo
REACT_APP_ORG_NAME=<org-name>
  1. Start the development server.
npm start

This will start the app on http://localhost:3000.

asgardeo-react-b2c-sample-app's People

Contributors

dasuni-30 avatar nipunibhagya avatar maheshika 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.