You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+42Lines changed: 42 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -131,6 +131,48 @@ export default {
131
131
</script>
132
132
```
133
133
134
+
## API reference interface
135
+
### Get sign up url
136
+
```javascript
137
+
getSignupUrl()
138
+
```
139
+
Return the casdoor url that navigates to the registration screen
140
+
141
+
### Get sign in url
142
+
```javascript
143
+
getSigninUrl()
144
+
```
145
+
Return the casdoor url that navigates to the login screen
146
+
147
+
### Get user profile page url
148
+
```javascript
149
+
getUserProfileUrl(userName, account)
150
+
```
151
+
Return the url to navigate to a specific user's casdoor personal page
152
+
153
+
### Get my profile page url
154
+
```javascript
155
+
getMyProfileUrl(account)
156
+
```
157
+
158
+
### Sign in
159
+
```javascript
160
+
signin(serverUrl, signinPath)
161
+
```
162
+
Handle the callback url from casdoor, call the back-end api to complete the login process
163
+
164
+
### Determine whether silent sign-in is being used
165
+
```javascript
166
+
isSilentSigninRequired()
167
+
```
168
+
We usually use this method to determine if silent login is being used. By default, if the silentSignin parameter is included in the URL and equals one, this method will return true. Of course, you can also use any method you prefer.
169
+
170
+
### silentSignin
171
+
```javascript
172
+
silentSignin(onSuccess, onFailure)
173
+
```
174
+
`onSuccess` and `onFailure` are the callback methods for successful and failed login.
175
+
134
176
## Q & A
135
177
136
178
Q1: How to solve "...index.js implicitly has an 'any' type..." error in typescript project?
0 commit comments