Skip to content

Commit

Permalink
SIWF compatible services
Browse files Browse the repository at this point in the history
  • Loading branch information
wilwade committed Sep 30, 2024
1 parent 75456a6 commit 9425ab0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions docs/src/Actions/Actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ SIWF handles three different situations for each user:

1. Generate Provider Login Request Payload and Signature ([Generator Tool](../Generate.md)) ([Documentation](../SignatureGeneration.md))
2. Build and send the user to the Authentication URL ([See Details](./Start.md))
3. Receive a callback from Frequency Access or other SIWF compatible system
3. Receive a callback from Frequency Access or other SIWF compatible services
4. Retrieve and process the login response ([See Details](./Response.md))

### Sequence Diagram
Expand All @@ -21,7 +21,7 @@ SIWF handles three different situations for each user:

## Backend Requirements

- Able to validate payloads received from a SIWF compatible system
- Able to validate payloads received from a SIWF compatible services
- Able to connect to a Frequency RPC Node
- Able to sign transactions to submit to the Frequency RPC Node

Expand Down
6 changes: 3 additions & 3 deletions docs/src/Actions/Response.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Response Sections

- `userPublicKey`: The key for the user signing this request
- `payloads`: Signed payloads from the user
- `credentials`: User approved verified credentials from Frequency Access (or other SIWF compatible system) such as email, phone, user keys, etc...
- `credentials`: User approved verified credentials from Frequency Access (or other SIWF compatible services) such as email, phone, user keys, etc...

### `userPublicKey`

Expand All @@ -44,7 +44,7 @@ These credentials follow the [DSNP Verifiable Credentials Specification](https:/

### Verify the Credential

_Trust Model Note_: You may choose to just trust credentials issued by Frequency Access (or other SIWF compatible system) given that the credential is fetched directly. These will have issuer `did:web:testnet.frequencyaccess.com` or `did:web:frequencyaccess.com`.
_Trust Model Note_: You may choose to just trust credentials issued by Frequency Access (or other SIWF compatible services) given that the credential is fetched directly. These will have issuer `did:web:testnet.frequencyaccess.com` or `did:web:frequencyaccess.com`.

1. Check that the `credentialSubject.id` matches the `userPublicKey` following the [`did:key` Method from the W3C](https://w3c-ccg.github.io/did-method-key/#format)
- Example: `f6cL4wq1HUNx11TcvdABNf9UNXXoyH47mVUwT59tzSFRW8yDH` is the [SS58](https://docs.substrate.io/reference/address-formats/) version with prefix `90` of the hex address `0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d`. `0xef01d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d` is multicodec `sr25519-pub` hex which is multiformat `base58-btc` `z6QNzHod3tSSJbwo4e5xGDcnsndsR9WByZzPoCGdbv3sv1jJ`
Expand Down Expand Up @@ -163,7 +163,7 @@ They can be submitted to the chain in one transaction using [`pay_with_capacity_
## Step 6: Session Starts

Once the payloads have been validated, the user's authenticated session may start.
SIWF systems do not manage user sessions.
SIWF services do not manage user sessions.

### Examples

Expand Down
2 changes: 1 addition & 1 deletion docs/src/Actions/Start.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Redirect User to Frequency Access (or other SIWF compatible system)
# Redirect User to Frequency Access (or other SIWF compatible services)

To start the authentication loop, your application will generate an Authentication URL for each user.

Expand Down
5 changes: 3 additions & 2 deletions docs/src/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# Sign In With Frequency Developer Documentation and Tools

Sign In With Frequency (SIWF) provides documentation and tools to integrate with [Frequency Access](https://frequencyaccess.com), an easy to use custodial social wallet for users on Frequency and other SIWF compatible services.
Sign In With Frequency (SIWF) provides documentation and tools to integrate with [Frequency Access](https://frequencyaccess.com) and other SIWF compatible services.
Frequency Access is an easy to use custodial social wallet for users on Frequency.

[JavaScript Quick Start](./QuickStart.md)

## Overview

There are a few main steps to authentication using Frequency Access or other SIWF compatible systems.
There are a few main steps to authentication using Frequency Access or other SIWF compatible services.

1. Your application sends the user the Frequency Access Authentication URL
2. Frequency Access verifies the user, and the user signs the requested payload(s)
Expand Down

0 comments on commit 9425ab0

Please sign in to comment.