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

Unity 4.12.1 #346

Merged
merged 1 commit into from
Apr 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Loading