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
@@ -241,7 +241,7 @@ Callback is triggered in the body with the code. Use the whole `params` object o
241
241
Next, exchange access and refresh tokens. You will receive `code` as the parameter in the callback endpoint, and `code_verifier` (if PKCE enabled) as per the previous step.
242
242
243
243
```ruby
244
-
KindeApi.fetch_tokens(
244
+
KindeSdk.fetch_tokens(
245
245
params_or_code,
246
246
# client_id: # default to @config.client_id,
247
247
# client_secret: # default to @config.client_secret,
@@ -261,8 +261,8 @@ KindeApi.fetch_tokens(
261
261
Save the whole hash in your session, redis or any other storage, and use it to build your client.
For proper refreshing you'll need to use `access_token`, `refresh_token` and probably `expires_in` if you want to know if your access token is still active. Use these two methods to work with refreshing:
578
578
579
579
```ruby
580
-
KindeApi.token_expired?(
580
+
KindeSdk.token_expired?(
581
581
session[:kinde_auth],
582
582
# client_id: # default to @config.client_id,
583
583
# client_secret: # default to @config.client_secret,
584
584
# audience: # default to "#{@config.domain}/api",
585
585
# domain: # default to @config.domain
586
586
) # => false
587
-
KindeApi.refresh_token(
587
+
KindeSdk.refresh_token(
588
588
session[:kinde_auth],
589
589
# client_id: # default to @config.client_id,
590
590
# client_secret: # default to @config.client_secret,
@@ -594,7 +594,7 @@ KindeApi.refresh_token(
594
594
595
595
```
596
596
597
-
`KindeApi#refresh_token` returns a new token hash, so it needs to be updated in your storage.
597
+
`KindeSdk#refresh_token` returns a new token hash, so it needs to be updated in your storage.
0 commit comments