Skip to content

Commit

Permalink
docs: remove 2fa examples and update the README to point to new mfa e…
Browse files Browse the repository at this point in the history
…xamples
  • Loading branch information
porcellus committed Dec 14, 2023
1 parent 322d83d commit 851b9b4
Show file tree
Hide file tree
Showing 31 changed files with 3 additions and 1,183 deletions.
2 changes: 1 addition & 1 deletion examples/with-thirdparty-2fa-passwordless/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# For 2FA demo please refer to [this demo](https://github.com/supertokens/supertokens-auth-react/blob/master/examples/with-thirdpartyemailpassword-2fa-passwordless).
# For 2FA demo please refer to [this demo](https://github.com/supertokens/supertokens-auth-react/blob/master/examples/with-multifactorauth).

If you would like to specifically see this demo app, you can find the code in the commit history.
23 changes: 0 additions & 23 deletions examples/with-thirdpartyemailpassword-2fa-passwordless/.gitignore

This file was deleted.

60 changes: 2 additions & 58 deletions examples/with-thirdpartyemailpassword-2fa-passwordless/README.md
Original file line number Diff line number Diff line change
@@ -1,59 +1,3 @@
![SuperTokens banner](https://raw.githubusercontent.com/supertokens/supertokens-logo/master/images/Artboard%20%E2%80%93%2027%402x.png)
# For 2FA demo please refer to [this demo](https://github.com/supertokens/supertokens-auth-react/blob/master/examples/with-multifactorauth).

# SuperTokens ThirdPartyEmailPassword + Passwordless 2fa demo

This demo app demonstrates how we can implement sign in with third party providers or email password with email verification and then add SMS OTP based 2FA on top of that.

## Project setup

Clone the repo, enter the directory, and use `npm` to install the project dependencies:

```bash
git clone https://github.com/supertokens/supertokens-auth-react
cd supertokens-auth-react/examples/with-thirdpartyemailpassword-2fa-passwordless
npm install
```

## Run the demo app

This compiles and serves the React app and starts the backend API server on port 3001.

```bash
npm run start
```

The app will start on `http://localhost:3000`

If you would like to modify the website (http://localhost:3000) or the API server (http://localhost:3001) URL:

- Change the `apiPort` or `apiDomain` values in `api-server/index.ts`
- Change the `apiPort` or `apiUrl` values in `src/App.tsx`
- Change the `websitePort` or `websiteDomain` values in `api-server/index.ts`
- Change the `websitePort` or `websiteUrl` values in `src/App.tsx`

## Sending emails and SMS

The demo app, by default sends email and SMS by contacting https://api.supertokens.com servers. The SMS sending via this service is rate limited. You can configure the demo app to use your own SMTP server and use your own Twilio account credentials. You can also override how the emails and SMS are sent to take full control of their design and how they are sent.

## Project structure & Parameters

- The frontend code is located in the `src` folder.
- The backend API is in the `api-server/index.ts` file.

## Production build

```bash
npm run build && npm run start
```

## Current drawbacks:

- No way of passing on redirectToPath across the 2 factors.

## Author

Created with :heart: by the folks at supertokens.com.

## License

This project is licensed under the Apache 2.0 license.
If you would like to specifically see this demo app, you can find the code in the commit history.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 851b9b4

Please sign in to comment.