File tree Expand file tree Collapse file tree 1 file changed +37
-1
lines changed
src/content/docs/developer-tools/sdks/backend Expand file tree Collapse file tree 1 file changed +37
-1
lines changed Original file line number Diff line number Diff line change @@ -147,7 +147,14 @@ To enable the AuthController, you need to add the following routes to your `conf
147
147
get " client_credentials_auth" => " auth#client_credentials_auth"
148
148
end
149
149
```
150
- ### Usage
150
+
151
+ If you decide instead to use the rails engine, you can add the following to your ` config/routes.rb ` file:
152
+
153
+ ``` ruby
154
+ mount KindeSdk ::Engine , at: " /kinde_sdk"
155
+ ```
156
+
157
+ ### Usage the AuthController in your application
151
158
To use the AuthController consume the routes in your application. For example in a Rails view file use the auth path to trigger the login flow:
152
159
153
160
``` ruby
@@ -157,6 +164,35 @@ To use the AuthController consume the routes in your application. For example in
157
164
< / a>
158
165
< / div>
159
166
```
167
+ The full list of paths exposed by the controller are the following:
168
+
169
+ ``` ruby
170
+ kinde_sdk_auth_path
171
+ kinde_sdk_callback_path
172
+ kinde_sdk_logout_path
173
+ kinde_sdk_logout_callback_path
174
+ kinde_sdk_client_credentials_auth_path
175
+ ```
176
+
177
+ #### Using the engine
178
+ When using the AuthController with the engine your application can use the paths as follows:
179
+
180
+ ``` ruby
181
+ < div class = " buttons" >
182
+ < a class = " button is-primary" href= " <%= kinde_sdk.auth_path %>" >
183
+ < strong> Log in < / strong>
184
+ < / a>
185
+ < / div>
186
+ ```
187
+ The full list of paths exposed by the engine are the following:
188
+
189
+ ``` ruby
190
+ kinde_sdk.auth_path
191
+ kinde_sdk.callback_path
192
+ kinde_sdk.logout_path
193
+ kinde_sdk.logout_callback_path
194
+ kinde_sdk.client_credentials_auth_path
195
+ ```
160
196
161
197
## Sign in and registration
162
198
You can’t perform that action at this time.
0 commit comments