Skip to content

Commit

Permalink
Require cross-origin on sep10 (#361)
Browse files Browse the repository at this point in the history
* Add cross-origin headers to sep10

* Correct wording for cross-origin message
  • Loading branch information
msfeldstein authored and Tom Quisel committed Aug 3, 2019
1 parent 8582099 commit 827c704
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ecosystem/sep-0010.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ A web service indicates that it supports user authentication via this protocol b
* [`GET <WEB_AUTH_ENDPOINT>`](#challenge): request a challenge (step 1)
* [`POST <WEB_AUTH_ENDPOINT>`](#token): exchange a signed challenge for session JWT (step 2)

## Cross-Origin Headers

Valid CORS headers are necessary to allow web clients from other sites to use the endpoints. The following HTTP header must be set for all authentication endpoints, including error responses.

```
Access-Control-Allow-Origin: *
```

### Challenge

This endpoint must respond with a Stellar transaction signed by the server that has an invalid sequence number (0) and thus cannot be executed on the Stellar network. The client can then sign the transaction using standard Stellar libraries and submit it to [`token`](#token) endpoint to prove that they control their account. This approach is compatible with hardware wallets such as Ledger. The client can also verify the server's signature to be sure the challenge is signed by the `SIGNING_KEY` from the server's [`stellar.toml`](sep-0001.md).
Expand Down

0 comments on commit 827c704

Please sign in to comment.