Browse Source

fix: revert changes to redirectTo and finished

feat/stacks-js-updates
Friedger Müffke 4 years ago
committed by Thomas Osmonson
parent
commit
0d10ee2748
  1. 10
      src/pages/authentication/connect.md

10
src/pages/authentication/connect.md

@ -50,8 +50,8 @@ The exact interface you'll use [is defined as](https://github.com/blockstack/ux/
```typescript
export interface AuthOptions {
redirectTo?: string;
finished?: (payload: FinishedData) => void;
redirectTo: string;
finished: (payload: FinishedData) => void;
sendToSignIn?: boolean;
userSession?: UserSession;
appDetails: {
@ -63,11 +63,11 @@ export interface AuthOptions {
| parameter | type | default | optional | description |
| ------------ | ----------- | ------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| redirectTo | string | | true | The path in your app where users go after sign in. |
| redirectTo | string | | false | The path in your app where users go after sign in. |
| appDetails | object | | false | an object which includes `appName: string` and `appIcon: string`. This will speed up the process of loading your app's information during onboarding. |
| finished | function | | true | A callback that can be invoked after authentication. This prevents having to do a whole page refresh in a new tab. One argument is passed to this callback, which is an object with `userSession` included. If included, then the `redirectTo` path is ignored, and the user will be logged in automatically. |
| finished | function | | false | A callback that can be invoked after authentication. This prevents having to do a whole page refresh in a new tab. One argument is passed to this callback, which is an object with `userSession` included. If included, then the `redirectTo` path is ignored, and the user will be logged in automatically. |
| sendToSignIn | boolean | false | true | Whether the user should go straight to the 'sign in' flow (false) or be presented with the 'sign up' flow (true) instead. |
| userSession | UserSession | | true | pass a `UserSession` instance to use for authentication. If it's not passed, `@blockstack/connect` will create one for you. |
| userSession | UserSession | | true | pass a `UserSession` instance to use for authentication. If it's not passed, `@blockstack/connect` will create one for you. |
### In React Apps

Loading…
Cancel
Save