Skip to content

Commit

Permalink
Update Auth Provider Setup pages structure
Browse files Browse the repository at this point in the history
  • Loading branch information
shahbaz17 committed Aug 22, 2024
1 parent d56cda6 commit d878d01
Show file tree
Hide file tree
Showing 8 changed files with 111 additions and 106 deletions.
2 changes: 1 addition & 1 deletion docs/auth-provider-setup/aggregate-verifier.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Creating Aggregate Verifier on Web3Auth Dashboard
sidebar_label: Aggregate Verifier
sidebar_label: Aggregate Multiple Logins
description:
"Creating Aggregate Verifier on the Web3Auth Dashboard | Auth Provider Setup | Documentation -
Web3Auth"
Expand Down
87 changes: 82 additions & 5 deletions docs/auth-provider-setup/auth-provider-setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,89 @@ the Web3Auth Auth Network nodes to query and validate the JWT tokens effectively

:::tip Get Started

Head over to the [**Verifiers**](./verifiers.mdx) section to understand how to create a verifier for
your application.
Head over to the [**Create Verifier**](./verifiers.mdx) page to understand how to create a verifier
with Web3Auth for your application.

:::

## Setting Up the Auth Provider
Web3Auth's design accommodates a variety of authentication scenarios through three primary verifier
types, each catering to different integration needs and offering distinct advantages:

### Default Verifiers

Default Verifiers are included with the Web3Auth Plug and Play SDKs to simplify the process of
creating and managing verifiers. We provide default verifiers for popular social login providers
like Google, Facebook, Twitter, and more. These pre-configured default verifiers are ready to use,
making it easy and quick to get started with Web3Auth.

However, it is highly recommended to create your own verifiers for your application, as they offer
more flexibility and control over the authentication flow. Some other caveats of using default
verifiers are:

- **Migration from Default Verifiers to Custom Verifiers is not possible**: Once the keys are
assigned for a particular verifier, they cannot be changed.
- **Aggregation of the default verifier is not possible**: If you want to aggregate two/more social
providers, like Google and Email Passwordless, you will need to create an Aggregate Verifier,
which is not possible if you start with:
- a Default Verifier
- Social Login Verifiers
- Custom Providers

### Social Login Verifiers

These verifiers make it easier to integrate popular social login options such as Google, Facebook,
Discord, Twitch, and a variety of additional social connections through Auth0. This simple approach
is particularly useful for applications using our services to manage login processes, making setup
hassle-free for both developers and users.

It's important to note that the Social Login Verifiers can also be used with your own custom login
flows. In this case, you would handle the authentication on your own server and then pass the JWT
token to Web3Auth for verification.

### Custom Verifiers

If you require more flexibility or need to incorporate authentication services or social connections
that are not directly supported within Web3Auth's dashboard, you can create a custom verifiers.
Whether you have your own backend authentication system or you're connecting to social login
providers that don't return an idToken, custom verifiers allow you to manually configure your
authentication flow. This setup is particularly beneficial for applications that integrate federated
identity providers such as Firebase, AWS Cognito, or Okta, and even your own custom JWT provider.
When setting up the custom verifier, you will need the JWKS Endpoint.

### Aggregate Verifiers

In the digital landscape, users often need to verify their identity using multiple login providers.
However, if you have to use multiple logins, you'll need to create multiple verifiers. The
[wallet generated for each user is specific to a verifier](/troubleshooting/different-private-key#verifier).
This means that different keys will be returned for different login methods.

To address this issue, aggregate verifiers allow for a unified identity across different login
mechanisms. For example, combining Google and Email Passwordless logins under a single verifier
ensures that users receive the same private key regardless of the login method they choose. These
login methods should share the same unique identifier, such as an email or username, that is
specific to the user.

This process involves creating an aggregate verifier, followed by sub-verifiers for each login
method.

:::info

Learn how to create an [Aggregate Verifier](/auth-provider-setup/aggregate-verifier).

:::

:::tip

- It is advisable to create an `Aggregate Multiple Providers` verifier even if you're using just one
login method for now. This will help you in the future if you want to add more login methods to
use the [**Aggregate Verifier**](/auth-provider-setup/aggregate-verifier) feature of Web3Auth in
your application.
- This is because we can't migrate from a single verifier(Social/Custom login methods) to an
aggregate verifier without changing the wallet addresses.

:::

## Setting Up Auth with Web3Auth

Integrating an OAuth provider with Web3Auth involves a few key steps, from selecting your provider
to creating the verifier and integrating it into your application. Here's a broad overview of the
Expand All @@ -53,7 +130,7 @@ process:

## Supported Auth Providers

### Social
### Social Connections

<SocialTiles />

Expand All @@ -69,7 +146,7 @@ The links below will help you set up the following authentication service provid

<FederatedTiles />

### Bring your own Custom Login Providers
### Bring your own JWT Providers

<BYOCustomJWTTiles />

Expand Down
2 changes: 1 addition & 1 deletion docs/auth-provider-setup/byo-jwt-provider.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Bring your own custom JWT Provider

sidebar_label: Bring Your Own JWT
description: "Bring your own custom JWT Provider | Documentation - Web3Auth"
image: "images/docs-meta-cards/documentation-card.png"
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---
title: Social Providers
title: Social Connections
sidebar_label: Introduction

description: "Social Providers | Documentation - Web3Auth"
description: "Social Login Providers | Documentation - Web3Auth"
---

import SocialTiles from "@site/src/common/docs/_social-login-providers.mdx";
Expand Down
93 changes: 11 additions & 82 deletions docs/auth-provider-setup/verifiers.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Creating Verifier on Web3Auth Dashboard
sidebar_label: Verifiers
sidebar_label: Create Verifier
description:
Creating Verifier on the Web3Auth Dashboard | Auth Provider Setup | Documentation - Web3Auth"
image: "images/docs-meta-cards/documentation-card.png"
Expand All @@ -10,87 +10,6 @@ A verifier is essentially a configuration that contains information about the OA
chosen for your application. It acts as a bridge between Web3Auth and the OAuth provider, enabling
the Auth Network nodes to query and validate JWT tokens effectively.

A verifier contains the necessary information for Web3Auth's network nodes to validate the JWT token
provided by an authentication service. This process ensures that the login attempt is legitimate and
that the user controls the associated social or external account.

## Types of Verifiers

Web3Auth's design accommodates a variety of authentication scenarios through three primary verifier
types, each catering to different integration needs and offering distinct advantages:

### Default Verifiers

For the basic integration of Web3Auth Plug and Play, we shield you from the complexities of creating
and managing verifiers. This is done by providing default verifiers for the most popular social
login providers, such as Google, Facebook, Twitter, and more. These default verifiers are
pre-configured and ready to use, allowing you to get started with Web3Auth quickly and easily.

However, it is highly recommended to create custom verifiers for your application, as they offer
more flexibility and control over the authentication flow. Some other caveats of using default
verifiers are:

- **Migration from Default Verifiers to Custom Verifiers is not possible**: Once the keys are
assigned for a particular verifier, they cannot be changed.
- **Aggregation of the default verifier is not possible**: If you want to aggregate two/more social
providers, like Google and Email Passwordless, you will need to create an Aggregate Verifier,
which is not possible if you start with:
- a Default Verifier
- Social Login Providers
- Custom Providers

### Social Login Verifiers

These verifiers simplify the integration of popular social login options - Google, Facebook,
Discord, Twitch, and through Auth0, an array of additional services. This straightforward approach
is especially beneficial for applications employing an implicit login flow, ensuring a hassle-free
setup for both developers and users. Head over to the particular documentation for the social login
provider you want to integrate with Web3Auth.

### Custom Verifiers

For those seeking greater control or needing to integrate authentication services not directly
supported within Web3Auth's dashboard, custom verifiers offer a solution. Whether you're leveraging
your own backend authentication system or connecting to various social login providers, custom
verifiers provide the flexibility to manually configure your authentication flow. This setup is
particularly useful for applications integrating federated identity providers like Firebase,
Cognito, or Okta, allowing for a tailored authentication experience.

### Aggregate Verifiers

The digital landscape often requires users to authenticate via multiple methods. However, with
multiple providers, you'll need to create multiple verifiers. However, the
[wallet generated for each user is specific to a verifier](/troubleshooting/different-private-key#verifier).

Aggregate verifiers address this need by enabling a unified identity across different login
mechanisms. For instance, combining Google and Email Passwordless logins under a single verifier
ensure that users receive the same private key regardless of their chosen method. These login
methods should share the same verifier identifier, e.g., email or username which is unique to the
user.

This process involves creating an aggregate verifier, followed by sub-verifiers for each login
method.

:::info

Learn how to create an [Aggregate Verifier](/auth-provider-setup/aggregate-verifier).

:::

:::tip

- It is advisable to create an `Aggregate Multiple Providers` verifier even if you're using just one
login method for now. This will help you in the future if you want to add more login methods to
use the [**Aggregate Verifier**](/auth-provider-setup/aggregate-verifier) feature of Web3Auth in
your application.
- This is because we can't migrate from a single verifier(Social/Custom login methods) to an
aggregate verifier without changing the wallet addresses.

:::

You can read more about verifiers
[in this GitHub discussion](https://github.com/orgs/Web3Auth/discussions/427#discussioncomment-3442052).

## Create Verifier

The `Custom Authentication` tab of a project looks something like this:
Expand Down Expand Up @@ -128,3 +47,13 @@ Click on the verifier or the three dots next to the verifier you wish to edit an

The `Edit Verifier` page will appear with previously filled information. Make the necessary changes
and click on the `Update Verifier` button on the bottom.

## Archive Verifier

To archive a verifier from the existing list, click on the three dots next to the verifier you wish
to archive, and then select "Archive Verifier" from the dropdown.

When you archive a verifier, it will no longer be available for use in your application. However,
you can always unarchive it later from the Archive page in the dashboard.

![Verifier Options](/images/dashboard/archive-verifier.png)
26 changes: 13 additions & 13 deletions sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -376,21 +376,9 @@ const sidebars: SidebarsConfig = {
"auth-provider-setup/auth-provider-setup",
"auth-provider-setup/verifiers",
"auth-provider-setup/aggregate-verifier",
"auth-provider-setup/byo-jwt-provider",
{
type: "category",
label: "Authentication Service Providers",
items: [
"auth-provider-setup/authentication-service-providers/auth0-service-provider",
"auth-provider-setup/authentication-service-providers/aws-cognito-service-provider",
"auth-provider-setup/authentication-service-providers/firebase-service-provider",
],
collapsible: true,
collapsed: false,
},
{
type: "category",
label: "Social Providers",
label: "Social Connections",
items: [
"auth-provider-setup/social-providers/social-providers",
"auth-provider-setup/social-providers/twitter",
Expand All @@ -417,6 +405,18 @@ const sidebars: SidebarsConfig = {
collapsible: true,
collapsed: false,
},
{
type: "category",
label: "Authentication Service Providers",
items: [
"auth-provider-setup/authentication-service-providers/auth0-service-provider",
"auth-provider-setup/authentication-service-providers/aws-cognito-service-provider",
"auth-provider-setup/authentication-service-providers/firebase-service-provider",
],
collapsible: true,
collapsed: false,
},
"auth-provider-setup/byo-jwt-provider",
],
},

Expand Down
2 changes: 1 addition & 1 deletion src/common/docs/_byo-custom-jwt-providers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export const tileGroupsDataBYOJWT = [
{
name: "",
description:
"Bring your own custom providers with Web3Auth, using one of the custom login schemes (either via JWT or ECDSA signatures). This way, your users can still use your existing login provider. The application should follow the JWT specification and use JWKS for signing the JWT, whose public keys are exposed by an endpoint.",
"You can integrate your own custom login providers with Web3Auth by using one of the custom login schemes, such as JWT or ECDSA signatures. This enables your users to continue using your existing login provider. Your application should adhere to the JWT specification and utilize JWKS for signing the JWT. The public keys for signing the JWT should be exposed through an endpoint.",
tiles: [
{
key: "jwt",
Expand Down
Binary file added static/images/dashboard/archive-verifier.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d878d01

Please sign in to comment.