Skip to content

awesome-reactivesearch/search-with-authorization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Search with authorization

This app builds upon Airbnb clone app. It shows listings of available stays where users can search and filter according to price, no. of guests, and date ranges. We are going to extend it, to include authentication and authorization.

Our extended app has a login mechanism that would allow users to sign up/sign in. Each user has a role assigned to them, either guest or host. As a host they would be able to create a listing but not as a guest. They would also be able to switch roles to test both types.

You can have a look at the live app.

Running locally

This app is built and deployed using netlify. It uses netlify functions to perform server side operations.

For building the app locally we would use netlify-cli. We can install it using the below command.

npm i -g netlify-cli

We then need to install the app dependencies.

yarn

Then we need to make a .env file into the root directory. It should have following variables filled.

AUTH0_DOMAIN=
AUTH0_CLIENT_ID=
AUTH0_CLIENT_SECRET=
APPBASE_API_CREDENTIAL=

We can then run

netlify dev