Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(auth-kit): Update docs for the new SafeAuthPack #273

Closed
wants to merge 9 commits into from

Conversation

yagopv
Copy link
Member

@yagopv yagopv commented Nov 6, 2023

@yagopv yagopv self-assigned this Nov 6, 2023
@yagopv yagopv changed the title Feat/update auth kit docs docs(auth-kit): Update docs for the new SafeAuthPack Nov 6, 2023
@yagopv yagopv marked this pull request as ready for review November 8, 2023 10:38
@yagopv yagopv requested review from germartinez and dasanra November 8, 2023 10:38
Copy link
Collaborator

@tanay1337 tanay1337 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docs structure has changed, so the location of the files and the placement in the sidebar will also need to be updated.

- `address`: The Ethereum address extracted from the provider.

### `getSafes(txServiceUrl): safes[]`

Returns the list of Safes associated with the signer address by calling the `getAddress()` method internally.
Returns the list of Safes associated with the signer address by calling the `getAddress()` method internally.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Returns the list of Safes associated with the signer address by calling the `getAddress()` method internally.
Returns the list of Safes associated with the signer address by internally calling the `getAddress()` method.

```

The Auth Kit can integrate several providers in the form of **"packs"**. A pack is a piece of code that works with the chosen provider to give Safe users access to new services.

To use each pack, the right package needs to be installed:
To use each pack, you need to ensure that the appropriate packages are installed.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
To use each pack, you need to ensure that the appropriate packages are installed.
To use each pack, you must ensure the appropriate packages are installed.

@@ -0,0 +1,216 @@
# SafeAuthPack

SafeAuth is a pluggable authentication infrastructure for Web3 wallets and applications. It simplifies onboarding for both mainstream and crypto native users, offering experiences tailored to their preferences. It supports all social logins, web and mobile native platforms, wallets, and other key management methods, creating a cryptographic key provider specific to the user and application.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
SafeAuth is a pluggable authentication infrastructure for Web3 wallets and applications. It simplifies onboarding for both mainstream and crypto native users, offering experiences tailored to their preferences. It supports all social logins, web and mobile native platforms, wallets, and other key management methods, creating a cryptographic key provider specific to the user and application.
SafeAuth is a pluggable authentication infrastructure for Web3 wallets and applications. It simplifies onboarding for mainstream and crypto native users, offering experiences tailored to their preferences. It supports all social logins, web and mobile native platforms, wallets, and other key management methods, creating a cryptographic key provider specific to the user and application.


SafeAuth is a pluggable authentication infrastructure for Web3 wallets and applications. It simplifies onboarding for both mainstream and crypto native users, offering experiences tailored to their preferences. It supports all social logins, web and mobile native platforms, wallets, and other key management methods, creating a cryptographic key provider specific to the user and application.

The `SafeAuthPack` enables the use of the [Web3Auth infrastructure](https://web3auth.io) with added Safe capabilities, such as retrieving the related Safe addresses for a given externally-owned account created using SafeAuth services.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The `SafeAuthPack` enables the use of the [Web3Auth infrastructure](https://web3auth.io) with added Safe capabilities, such as retrieving the related Safe addresses for a given externally-owned account created using SafeAuth services.
The `SafeAuthPack` enables using the [Web3Auth infrastructure](https://web3auth.io) with added Safe capabilities, such as retrieving the related Safe addresses for a given externally-owned account created using SafeAuth services.


The `SafeAuthPack` enables the use of the [Web3Auth infrastructure](https://web3auth.io) with added Safe capabilities, such as retrieving the related Safe addresses for a given externally-owned account created using SafeAuth services.

The pack helps with the onboarding of web2 users and provides a ethereum signer address that can be used across any dApp using the different Ethereum chains.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The pack helps with the onboarding of web2 users and provides a ethereum signer address that can be used across any dApp using the different Ethereum chains.
The pack helps onboard web2 users and provides an Ethereum signer address that can be used across any dApp using different Ethereum chains.


## Usage

Calling `init()` when your page loads or component renders is all it takes to use the Auth Kit with the `SafeAuthPack`. To start the authentication process, simply call `signIn()` afterwards. This method returns the EOA and associated Safe addresses.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Calling `init()` when your page loads or component renders is all it takes to use the Auth Kit with the `SafeAuthPack`. To start the authentication process, simply call `signIn()` afterwards. This method returns the EOA and associated Safe addresses.
Calling `init()` when your page loads or component renders is all it takes to use the Auth Kit with the `SafeAuthPack`. To start the authentication process, call `signIn()` afterward. This method returns the EOA and associated Safe addresses.

@@ -0,0 +1,179 @@
# Integration with SafeAuth

This guide demonstrate how to create an externally-owned account using your email or social media account. Once authenticated, you can sign transactions and interact with any Safe accounts you own.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This guide demonstrate how to create an externally-owned account using your email or social media account. Once authenticated, you can sign transactions and interact with any Safe accounts you own.
This guide demonstrates creating an externally-owned account using your email or social media account. Once authenticated, you can sign transactions and interact with your Safe accounts.


## Create a SafeAuthPack instance

We are going to use the provided `SafeAuthPack` exported in the `@safe-global/auth-kit` package.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
We are going to use the provided `SafeAuthPack` exported in the `@safe-global/auth-kit` package.
We will use the provided `SafeAuthPack` exported in the `@safe-global/auth-kit` package.


## Sign in to an Ethereum account

After creating your `SafeAuthPack` instance, initiate the authentication process by calling the `signIn()` method. Typically, this method is called when the user clicks on a "Sign In" button on the web page.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
After creating your `SafeAuthPack` instance, initiate the authentication process by calling the `signIn()` method. Typically, this method is called when the user clicks on a "Sign In" button on the web page.
After creating your `SafeAuthPack` instance, initiate the authentication process by calling the `signIn()` method. Typically, this method is called when the user clicks a "Sign In" button on the web page.


## Signing and executing transactions using the SafeAuthPack and Protocol Kit

The `SafeAuthPack` can be used in conjunction with the [Protocol Kit](../protocol-kit/README.md) to establish a connection to a Safe. This connection is made using the `provider` and `signer` associated with the authenticated account.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The `SafeAuthPack` can be used in conjunction with the [Protocol Kit](../protocol-kit/README.md) to establish a connection to a Safe. This connection is made using the `provider` and `signer` associated with the authenticated account.
The `SafeAuthPack` can be used with the [Protocol Kit](../protocol-kit/README.md) to establish a connection to a Safe. This connection is made using the `provider` and `signer` associated with the authenticated account.

@dasanra
Copy link
Contributor

dasanra commented Nov 27, 2023

@tanay1337 thank you for your review! I took all the suggestions and adapted the PR to match the current Safe docs structure. We can continue here:

#289

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants