Skip to content
This repository has been archived by the owner on Aug 5, 2024. It is now read-only.

Commit

Permalink
Unity 4.12.1 (#346)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xFirekeeper authored Apr 17, 2024
1 parent 080f588 commit 14b36ed
Showing 1 changed file with 15 additions and 22 deletions.
37 changes: 15 additions & 22 deletions src/app/unity/wallets/actions/authenticate/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ export const metadata = createMetadata({
"Authenticate the user by signing a payload that can be used to securely identify users.",
});

# Authenticate
# AuthenticateAndLoginServerSide

Using [Auth](/auth), authenticate the user by signing a payload that can be used to securely identify users.

## Usage

```csharp
var data = await sdk.Wallet.Authenticate("domain");
string token = await sdk.Wallet.AuthenticateAndLoginServerSide("domain", 1);
```

## Configuration
Expand All @@ -24,27 +24,20 @@ The domain you used in your authentication backend.

[Learn more about how auth works](/auth/how-auth-works/sign-in-with-wallet).

### chainId

The chain ID of the blockchain you want to authenticate with.

### authPayloadPath (optional)

The payload generation endpoint in your backend. Defaults to `/auth/payload`.

### authLoginPath (optional)

The login endpoint in your backend. Defaults to `/auth/login`.

Must be a `string`.

## Return Value

Returns a `LoginPayload` struct containing the following properties:

```csharp
{
string signature;
{
string domain;
string address;
string statement;
string uri;
string version;
string chain_id;
string nonce;
string issued_at;
string expiration_time;
string invalid_before;
List<string> resources;
}
}
```
A `string` representing the final post-login auth token returned by the server.

0 comments on commit 14b36ed

Please sign in to comment.