-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update: added the BuildContext information to the documentation. #311
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -178,11 +178,11 @@ The Kinde client provides methods for a simple login / register flow which authe | |||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
```dart | ||||||||||||||||||||||||||||||||||||||
... | ||||||||||||||||||||||||||||||||||||||
final String token = await sdk.login(); | ||||||||||||||||||||||||||||||||||||||
// or sdk.login(type: AuthFlowType.pkce) for apply pkce flow | ||||||||||||||||||||||||||||||||||||||
final String token = await sdk.login(context: content); | ||||||||||||||||||||||||||||||||||||||
// or sdk.login(type: AuthFlowType.pkce, context: context) for apply pkce flow | ||||||||||||||||||||||||||||||||||||||
... | ||||||||||||||||||||||||||||||||||||||
await sdk.register(); | ||||||||||||||||||||||||||||||||||||||
// or sdk.register(type: AuthFlowType.pkce) for apply pkce flow | ||||||||||||||||||||||||||||||||||||||
await sdk.register(context: context); | ||||||||||||||||||||||||||||||||||||||
// or sdk.register(type: AuthFlowType.pkce, context: context) for apply pkce flow | ||||||||||||||||||||||||||||||||||||||
... | ||||||||||||||||||||||||||||||||||||||
Comment on lines
179
to
186
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Add explanation for the BuildContext requirement To help developers understand the change, please add an explanation of why BuildContext is required for the login and register methods. This aligns with the PR objective of documenting BuildContext additions. Add the following explanation before the code examples: +### Why BuildContext is required
+
+The `login` and `register` methods require a BuildContext parameter to handle navigation and display authentication UI properly within the Flutter widget tree. This ensures that the authentication flow integrates seamlessly with your app's navigation stack.
+
### R**edirect after authentication** 📝 Committable suggestion
Suggested change
|
||||||||||||||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix typo in the login example
There's a typo in the parameter name. It should be
context
instead ofcontent
.📝 Committable suggestion