Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ oauth2.authorizePost(
"<PROMPT>", // prompt (optional)
0L, // max_age (optional)
"<AUTHORIZATION_DETAILS>", // authorization_details (optional)
"", // resource (optional)
List.of(), // resource (optional)
"<AUDIENCE>", // audience (optional)
"<REQUEST_URI>", // request_uri (optional)
new CoroutineCallback<>((result, error) -> {
Expand Down
2 changes: 1 addition & 1 deletion examples/2.4.x/client-android/java/oauth2/authorize.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ oauth2.authorize(
"<PROMPT>", // prompt (optional)
0L, // max_age (optional)
"<AUTHORIZATION_DETAILS>", // authorization_details (optional)
"", // resource (optional)
List.of(), // resource (optional)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Java OAuth2 examples use List without importing it

This call now uses List.of(), but the snippet does not import java.util.List, so it will not compile. The same missing import affects the other modified Java OAuth2 examples that now pass List.of() for resource.

Prompt To Fix With AI
This is a comment left during a code review.
Path: examples/2.4.x/client-android/java/oauth2/authorize.md
Line: 26

Comment:
**Java OAuth2 examples use List without importing it**

This call now uses `List.of()`, but the snippet does not import `java.util.List`, so it will not compile. The same missing import affects the other modified Java OAuth2 examples that now pass `List.of()` for `resource`.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

🟡 Minor · bug · Reply if this doesn't apply.

"<AUDIENCE>", // audience (optional)
"<REQUEST_URI>", // request_uri (optional)
new CoroutineCallback<>((result, error) -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ oauth2.createDeviceAuthorization(
"<CLIENT_ID>", // client_id (optional)
"<SCOPE>", // scope (optional)
"<AUTHORIZATION_DETAILS>", // authorization_details (optional)
"", // resource (optional)
List.of(), // resource (optional)
"<AUDIENCE>", // audience (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
Expand Down
2 changes: 1 addition & 1 deletion examples/2.4.x/client-android/java/oauth2/create-par.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ oauth2.createPAR(
"<PROMPT>", // prompt (optional)
0L, // max_age (optional)
"<AUTHORIZATION_DETAILS>", // authorization_details (optional)
"", // resource (optional)
List.of(), // resource (optional)
"<AUDIENCE>", // audience (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
Expand Down
2 changes: 1 addition & 1 deletion examples/2.4.x/client-android/java/oauth2/create-token.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ oauth2.createToken(
"<CLIENT_SECRET>", // client_secret (optional)
"<CODE_VERIFIER>", // code_verifier (optional)
"https://example.com", // redirect_uri (optional)
"", // resource (optional)
List.of(), // resource (optional)
"<AUDIENCE>", // audience (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ val result = oauth2.authorizePost(
prompt = "<PROMPT>", // (optional)
maxAge = 0, // (optional)
authorizationDetails = "<AUTHORIZATION_DETAILS>", // (optional)
resource = "", // (optional)
resource = listOf(), // (optional)
audience = "<AUDIENCE>", // (optional)
requestUri = "<REQUEST_URI>", // (optional)
)
Expand Down
2 changes: 1 addition & 1 deletion examples/2.4.x/client-android/kotlin/oauth2/authorize.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ val result = oauth2.authorize(
prompt = "<PROMPT>", // (optional)
maxAge = 0, // (optional)
authorizationDetails = "<AUTHORIZATION_DETAILS>", // (optional)
resource = "", // (optional)
resource = listOf(), // (optional)
audience = "<AUDIENCE>", // (optional)
requestUri = "<REQUEST_URI>", // (optional)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ val result = oauth2.createDeviceAuthorization(
clientId = "<CLIENT_ID>", // (optional)
scope = "<SCOPE>", // (optional)
authorizationDetails = "<AUTHORIZATION_DETAILS>", // (optional)
resource = "", // (optional)
resource = listOf(), // (optional)
audience = "<AUDIENCE>", // (optional)
)
```
2 changes: 1 addition & 1 deletion examples/2.4.x/client-android/kotlin/oauth2/create-par.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ val result = oauth2.createPAR(
prompt = "<PROMPT>", // (optional)
maxAge = 0, // (optional)
authorizationDetails = "<AUTHORIZATION_DETAILS>", // (optional)
resource = "", // (optional)
resource = listOf(), // (optional)
audience = "<AUDIENCE>", // (optional)
)
```
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ val result = oauth2.createToken(
clientSecret = "<CLIENT_SECRET>", // (optional)
codeVerifier = "<CODE_VERIFIER>", // (optional)
redirectUri = "https://example.com", // (optional)
resource = "", // (optional)
resource = listOf(), // (optional)
audience = "<AUDIENCE>", // (optional)
)
```
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ let oauth2Authorize = try await oauth2.authorizePost(
prompt: "<PROMPT>", // optional
max_age: 0, // optional
authorization_details: "<AUTHORIZATION_DETAILS>", // optional
resource: "", // optional
resource: [], // optional
audience: "<AUDIENCE>", // optional
request_uri: "<REQUEST_URI>" // optional
)
Expand Down
2 changes: 1 addition & 1 deletion examples/2.4.x/client-apple/examples/oauth2/authorize.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ let oauth2Authorize = try await oauth2.authorize(
prompt: "<PROMPT>", // optional
max_age: 0, // optional
authorization_details: "<AUTHORIZATION_DETAILS>", // optional
resource: "", // optional
resource: [], // optional
audience: "<AUDIENCE>", // optional
request_uri: "<REQUEST_URI>" // optional
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ let oauth2DeviceAuthorization = try await oauth2.createDeviceAuthorization(
client_id: "<CLIENT_ID>", // optional
scope: "<SCOPE>", // optional
authorization_details: "<AUTHORIZATION_DETAILS>", // optional
resource: "", // optional
resource: [], // optional
audience: "<AUDIENCE>" // optional
)

Expand Down
2 changes: 1 addition & 1 deletion examples/2.4.x/client-apple/examples/oauth2/create-par.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ let oauth2PAR = try await oauth2.createPAR(
prompt: "<PROMPT>", // optional
max_age: 0, // optional
authorization_details: "<AUTHORIZATION_DETAILS>", // optional
resource: "", // optional
resource: [], // optional
audience: "<AUDIENCE>" // optional
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ let oauth2Token = try await oauth2.createToken(
client_secret: "<CLIENT_SECRET>", // optional
code_verifier: "<CODE_VERIFIER>", // optional
redirect_uri: "https://example.com", // optional
resource: "", // optional
resource: [], // optional
audience: "<AUDIENCE>" // optional
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
```dart
import 'package:appwrite/appwrite.dart';
import 'package:appwrite/models.dart' as models;

Client client = Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

Account account = Account(client);

Session result = await account.createAnonymousSession();
models.Session result = await account.createAnonymousSession();
```
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
```dart
import 'package:appwrite/appwrite.dart';
import 'package:appwrite/models.dart' as models;

Client client = Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

Account account = Account(client);

Session result = await account.createEmailPasswordSession(
models.Session result = await account.createEmailPasswordSession(
email: 'email@example.com',
password: 'password',
duration: 60, // optional
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
```dart
import 'package:appwrite/appwrite.dart';
import 'package:appwrite/models.dart' as models;

Client client = Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

Account account = Account(client);

Token result = await account.createEmailToken(
models.Token result = await account.createEmailToken(
userId: '<USER_ID>',
email: 'email@example.com',
phrase: false, // optional
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
```dart
import 'package:appwrite/appwrite.dart';
import 'package:appwrite/models.dart' as models;

Client client = Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

Account account = Account(client);

Token result = await account.createEmailVerificationOTP(
models.Token result = await account.createEmailVerificationOTP(
phrase: false, // optional
);
```
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
```dart
import 'package:appwrite/appwrite.dart';
import 'package:appwrite/models.dart' as models;

Client client = Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

Account account = Account(client);

Token result = await account.createEmailVerification(
models.Token result = await account.createEmailVerification(
url: 'https://example.com',
);
```
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
```dart
import 'package:appwrite/appwrite.dart';
import 'package:appwrite/models.dart' as models;
import 'package:appwrite/enums.dart' as enums;

Client client = Client()
Expand All @@ -8,7 +9,7 @@ Client client = Client()

Account account = Account(client);

Session result = await account.createIdTokenSession(
models.Session result = await account.createIdTokenSession(
provider: enums.IdTokenProvider.apple,
idToken: '<ID_TOKEN>',
nonce: '<NONCE>', // optional
Expand Down
3 changes: 2 additions & 1 deletion examples/2.4.x/client-flutter/examples/account/create-jwt.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
```dart
import 'package:appwrite/appwrite.dart';
import 'package:appwrite/models.dart' as models;

Client client = Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

Account account = Account(client);

Jwt result = await account.createJWT(
models.Jwt result = await account.createJWT(
duration: 0, // optional
);
```
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
```dart
import 'package:appwrite/appwrite.dart';
import 'package:appwrite/models.dart' as models;

Client client = Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

Account account = Account(client);

Token result = await account.createMagicURLToken(
models.Token result = await account.createMagicURLToken(
userId: '<USER_ID>',
email: 'email@example.com',
url: 'https://example.com', // optional
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
```dart
import 'package:appwrite/appwrite.dart';
import 'package:appwrite/models.dart' as models;
import 'package:appwrite/enums.dart' as enums;

Client client = Client()
Expand All @@ -8,7 +9,7 @@ Client client = Client()

Account account = Account(client);

MfaType result = await account.createMFAAuthenticator(
models.MfaType result = await account.createMFAAuthenticator(
type: enums.AuthenticatorType.totp,
);
```
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
```dart
import 'package:appwrite/appwrite.dart';
import 'package:appwrite/models.dart' as models;
import 'package:appwrite/enums.dart' as enums;

Client client = Client()
Expand All @@ -8,7 +9,7 @@ Client client = Client()

Account account = Account(client);

MfaChallenge result = await account.createMFAChallenge(
models.MfaChallenge result = await account.createMFAChallenge(
factor: enums.AuthenticationFactor.email,
);
```
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
```dart
import 'package:appwrite/appwrite.dart';
import 'package:appwrite/models.dart' as models;

Client client = Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

Account account = Account(client);

MfaRecoveryCodes result = await account.createMFARecoveryCodes();
models.MfaRecoveryCodes result = await account.createMFARecoveryCodes();
```
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
```dart
import 'package:appwrite/appwrite.dart';
import 'package:appwrite/models.dart' as models;

Client client = Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

Account account = Account(client);

PasskeyChallenge result = await account.createPasskeyToken();
models.PasskeyChallenge result = await account.createPasskeyToken();
```
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
```dart
import 'package:appwrite/appwrite.dart';
import 'package:appwrite/models.dart' as models;

Client client = Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

Account account = Account(client);

PasskeyChallenge result = await account.createPasskey(
models.PasskeyChallenge result = await account.createPasskey(
passkeyId: '<PASSKEY_ID>', // optional
name: '<NAME>', // optional
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
```dart
import 'package:appwrite/appwrite.dart';
import 'package:appwrite/models.dart' as models;

Client client = Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

Account account = Account(client);

Token result = await account.createPhoneToken(
models.Token result = await account.createPhoneToken(
userId: '<USER_ID>',
phone: '+12065550100',
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
```dart
import 'package:appwrite/appwrite.dart';
import 'package:appwrite/models.dart' as models;

Client client = Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

Account account = Account(client);

Token result = await account.createPhoneVerification();
models.Token result = await account.createPhoneVerification();
```
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
```dart
import 'package:appwrite/appwrite.dart';
import 'package:appwrite/models.dart' as models;

Client client = Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

Account account = Account(client);

Target result = await account.createPushTarget(
models.Target result = await account.createPushTarget(
targetId: '<TARGET_ID>',
identifier: '<IDENTIFIER>',
providerId: '<PROVIDER_ID>', // optional
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
```dart
import 'package:appwrite/appwrite.dart';
import 'package:appwrite/models.dart' as models;

Client client = Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

Account account = Account(client);

Token result = await account.createRecoveryOTP(
models.Token result = await account.createRecoveryOTP(
email: 'email@example.com',
phrase: false, // optional
);
Expand Down
Loading
Loading