Skip to content

Commit 4458700

Browse files
kezikepgray-hiro
authored andcommitted
Replace finished method with onFinish
The appropriate name of the post-authentication callback seems to be `onFinish`, not `finished` based on the code here: https://github.com/blockstack/connect/blob/main/packages/connect/src/auth.ts
1 parent aaf93c2 commit 4458700

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/pages/build-apps/guides/authentication.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ function authenticate() {
114114
The `showConnect` function accepts a number of properties within a parameter object such as:
115115

116116
- The app's `name` and `icon`: provided as strings comprising the `appDetails` object property.
117-
- The `redirectTo` string: used to provide a URL to which the user should be redirected upon successful authentication. The `finished` callback serves a similar purpose by handling successful authentication within a context of a popup window.
117+
- The `redirectTo` string: used to provide a URL to which the user should be redirected upon successful authentication. The `onFinish` callback serves a similar purpose by handling successful authentication within a context of a popup window.
118118
- The `userSession` object initiated above.
119119

120120
Once the user selects the button presented in this modal, they are passed to the Stacks Wallet for authenticator with the `authRequest` token as a GET parameter. From there they can confirm authentication and generate a new _Secret Key_ or Stacks identity before doing so, as needed before coming back to the app.
@@ -150,7 +150,7 @@ The authenticated state can later be detected by the `isUserSignedIn` method in
150150

151151
If the user has indeed confirmed authentication in the context of a popup window, the authenticator will resolve the pending authentication state automatically with the app within the parent window.
152152

153-
It will then trigger the `finished` function provided above, which can be used similarly to save the user's information into their session as retrieved with `userSession.loadUserData()`.
153+
It will then trigger the `onFinish` function provided above, which can be used similarly to save the user's information into their session as retrieved with `userSession.loadUserData()`.
154154

155155
## Usage in React Apps
156156

0 commit comments

Comments
 (0)