mirror of
https://github.com/aljazceru/pubky-core.git
synced 2026-01-14 11:44:32 +01:00
chore(js): publish @synonymdev/pubky@0.4.0
This commit is contained in:
@@ -103,11 +103,13 @@ await client.signout(publicKey)
|
||||
|
||||
#### authRequest
|
||||
```js
|
||||
let [pubkyauthUrl, sessionPromise] = client.authRequest(relay, capabilities);
|
||||
let pubkyAuthRequest = client.authRequest(relay, capabilities);
|
||||
|
||||
let pubkyauthUrl= pubkyAuthRequest.url();
|
||||
|
||||
showQr(pubkyauthUrl);
|
||||
|
||||
let pubky = await sessionPromise;
|
||||
let pubky = await pubkyAuthRequest.response();
|
||||
```
|
||||
|
||||
Sign in to a user's Homeserver, without access to their [Keypair](#keypair), nor even [PublicKey](#publickey),
|
||||
@@ -116,10 +118,6 @@ instead request permissions (showing the user pubkyauthUrl), and await a Session
|
||||
- relay: A URL to an [HTTP relay](https://httprelay.io/features/link/) endpoint.
|
||||
- capabilities: A list of capabilities required for the app for example `/pub/pubky.app/:rw,/pub/example.com/:r`.
|
||||
|
||||
Returns:
|
||||
- pubkyauthUrl: A url to show to the user to scan or paste into an Authenticator app holding the user [Keypair](#keypair)
|
||||
- sessionPromise: A promise that resolves into a [PublicKey](#publickey) on success, which you can use in `client.session(pubky)` to resolve more information about the Session.
|
||||
|
||||
#### sendAuthToken
|
||||
```js
|
||||
await client.sendAuthToken(keypair, pubkyauthUrl);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "@synonymdev/pubky",
|
||||
"type": "module",
|
||||
"description": "Pubky client",
|
||||
"version": "0.4.0-rc.4",
|
||||
"version": "0.4.0",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
Reference in New Issue
Block a user