Skip to content

Commit fece212

Browse files
Merge pull request #381 from brettchaldecott/fix/ruby-typos
fix: corrected types and Gemfile contents
2 parents d3a8a84 + bb959da commit fece212

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/content/docs/developer-tools/sdks/backend/ruby-sdk.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ If you haven’t already got a Kinde account, [register for free here](https://a
2727
Add this line into your Gemfile and run a bundler or install manually through a gem command.
2828

2929
```ruby
30-
gem 'kinde_sdk', git: 'https://github.com/kinde-oss/kinde-ruby-sdk.git', branch: 'main'
30+
gem 'kinde_sdk', '~> 1.6.1'
3131

3232
```
3333

@@ -241,7 +241,7 @@ Callback is triggered in the body with the code. Use the whole `params` object o
241241
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.
242242

243243
```ruby
244-
KindeApi.fetch_tokens(
244+
KindeSdk.fetch_tokens(
245245
params_or_code,
246246
# client_id: # default to @config.client_id,
247247
# client_secret: # default to @config.client_secret,
@@ -261,8 +261,8 @@ KindeApi.fetch_tokens(
261261
Save the whole hash in your session, redis or any other storage, and use it to build your client.
262262

263263
```ruby
264-
session[:kinde_auth] = KindeApi.fetch_tokens(code).slice(:access_token, :refresh_token, :expires_at)
265-
client = KindeApi.client(session[:kinde_auth]) # => #<KindeApi::Client:0x00007faf31e5ecb8>
264+
session[:kinde_auth] = KindeSdk.fetch_tokens(code).slice(:access_token, :refresh_token, :expires_at)
265+
client = KindeSdk.client(session[:kinde_auth]) # => #<KindeSdk::Client:0x00007faf31e5ecb8>
266266

267267
```
268268

@@ -577,14 +577,14 @@ client.organizations.add_organization_users(code: "org_1111", users: ["kp:12311.
577577
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:
578578

579579
```ruby
580-
KindeApi.token_expired?(
580+
KindeSdk.token_expired?(
581581
session[:kinde_auth],
582582
# client_id: # default to @config.client_id,
583583
# client_secret: # default to @config.client_secret,
584584
# audience: # default to "#{@config.domain}/api",
585585
# domain: # default to @config.domain
586586
) # => false
587-
KindeApi.refresh_token(
587+
KindeSdk.refresh_token(
588588
session[:kinde_auth],
589589
# client_id: # default to @config.client_id,
590590
# client_secret: # default to @config.client_secret,
@@ -594,7 +594,7 @@ KindeApi.refresh_token(
594594

595595
```
596596

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.
598598

599599
## SDK API reference
600600

0 commit comments

Comments
 (0)