diff --git a/docs/references/account/create-email-verification.md b/docs/references/account/create-email-verification.md index d4fc2dabb4..2e09f50e79 100644 --- a/docs/references/account/create-email-verification.md +++ b/docs/references/account/create-email-verification.md @@ -1,3 +1,3 @@ -Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](/docs/client/account#accountUpdateEmailVerification). The verification link sent to the user's email address is valid for 7 days. +Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](/docs/references/cloud/client-web/account#updateVerification). The verification link sent to the user's email address is valid for 7 days. Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface. diff --git a/docs/references/account/create-magic-url-session.md b/docs/references/account/create-magic-url-session.md index b1e63e144c..c34dcb7201 100644 --- a/docs/references/account/create-magic-url-session.md +++ b/docs/references/account/create-magic-url-session.md @@ -1,3 +1,3 @@ -Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [PUT /account/sessions/magic-url](/docs/client/account#accountUpdateMagicURLSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default. +Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [PUT /account/sessions/magic-url](updateMagicURLSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default. A user is limited to 10 active sessions at a time by default. [Learn more about session limits](/docs/authentication-security#limits). diff --git a/docs/references/account/create-phone-session.md b/docs/references/account/create-phone-session.md index 8c8a1aebe5..15547668bc 100644 --- a/docs/references/account/create-phone-session.md +++ b/docs/references/account/create-phone-session.md @@ -1,3 +1,3 @@ -Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [PUT /account/sessions/phone](/docs/client/account#accountUpdatePhoneSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes. +Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [PUT /account/sessions/phone](/docs/references/cloud/client-web/account#updatePhoneSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes. A user is limited to 10 active sessions at a time by default. [Learn more about session limits](/docs/authentication-security#limits). \ No newline at end of file diff --git a/docs/references/account/create-phone-verification.md b/docs/references/account/create-phone-verification.md index 28627b439f..467e6210dc 100644 --- a/docs/references/account/create-phone-verification.md +++ b/docs/references/account/create-phone-verification.md @@ -1 +1 @@ -Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](/docs/client/account#accountUpdatePhone) endpoint. Learn more about how to [complete the verification process](/docs/client/account#accountUpdatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes. \ No newline at end of file +Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](/docs/references/cloud/client-web/account#updatePhone) endpoint. Learn more about how to [complete the verification process](/docs/references/cloud/client-web/account#updatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes. \ No newline at end of file diff --git a/docs/references/account/create-recovery.md b/docs/references/account/create-recovery.md index 0b10fba210..4cc4699529 100644 --- a/docs/references/account/create-recovery.md +++ b/docs/references/account/create-recovery.md @@ -1 +1 @@ -Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT /account/recovery](/docs/client/account#accountUpdateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour. \ No newline at end of file +Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT /account/recovery](/docs/references/cloud/client-web/account#updateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour. \ No newline at end of file diff --git a/docs/references/account/create-session-anonymous.md b/docs/references/account/create-session-anonymous.md index f10778b786..09f091df5a 100644 --- a/docs/references/account/create-session-anonymous.md +++ b/docs/references/account/create-session-anonymous.md @@ -1 +1 @@ -Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](/docs/client/account#accountUpdateEmail) or create an [OAuth2 session](/docs/client/account#accountCreateOAuth2Session). \ No newline at end of file +Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](UpdateEmail) or create an [OAuth2 session](/docs/references/cloud/client-web/account#CreateOAuth2Session). \ No newline at end of file diff --git a/docs/references/account/create.md b/docs/references/account/create.md index 84e0008153..5278939479 100644 --- a/docs/references/account/create.md +++ b/docs/references/account/create.md @@ -1 +1 @@ -Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [/account/verfication](/docs/client/account#accountCreateVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](/docs/client/account#accountCreateSession). \ No newline at end of file +Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [/account/verfication](/docs/references/cloud/client-web/account#createVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](/docs/references/cloud/client-web/account#createSession). \ No newline at end of file diff --git a/docs/references/account/delete-session.md b/docs/references/account/delete-session.md index c7439638af..220147ab13 100644 --- a/docs/references/account/delete-session.md +++ b/docs/references/account/delete-session.md @@ -1 +1 @@ -Logout the user. Use 'current' as the session ID to logout on this device, use a session ID to logout on another device. If you're looking to logout the user on all devices, use [Delete Sessions](/docs/client/account#accountDeleteSessions) instead. \ No newline at end of file +Logout the user. Use 'current' as the session ID to logout on this device, use a session ID to logout on another device. If you're looking to logout the user on all devices, use [Delete Sessions](/docs/references/cloud/client-web/account#deleteSessions) instead. \ No newline at end of file diff --git a/docs/references/account/update-magic-url-session.md b/docs/references/account/update-magic-url-session.md index b85036082f..ea3d10c3b2 100644 --- a/docs/references/account/update-magic-url-session.md +++ b/docs/references/account/update-magic-url-session.md @@ -1,3 +1,3 @@ -Use this endpoint to complete creating the session with the Magic URL. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST /account/sessions/magic-url](/docs/client/account#accountCreateMagicURLSession) endpoint. +Use this endpoint to complete creating the session with the Magic URL. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST /account/sessions/magic-url](/docs/references/cloud/client-web/account#createMagicURLSession) endpoint. Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface. \ No newline at end of file diff --git a/docs/references/account/update-phone-session.md b/docs/references/account/update-phone-session.md index 7bd8e61617..3f8866d953 100644 --- a/docs/references/account/update-phone-session.md +++ b/docs/references/account/update-phone-session.md @@ -1 +1 @@ -Use this endpoint to complete creating a session with SMS. Use the **userId** from the [createPhoneSession](/docs/client/account#accountCreatePhoneSession) endpoint and the **secret** received via SMS to successfully update and confirm the phone session. \ No newline at end of file +Use this endpoint to complete creating a session with SMS. Use the **userId** from the [createPhoneSession](/docs/references/cloud/client-web/account#createPhoneSession) endpoint and the **secret** received via SMS to successfully update and confirm the phone session. \ No newline at end of file diff --git a/docs/references/account/update-phone.md b/docs/references/account/update-phone.md index 934d9cad7f..fab28fbf5a 100644 --- a/docs/references/account/update-phone.md +++ b/docs/references/account/update-phone.md @@ -1 +1 @@ -Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST /account/verification/phone](/docs/client/account#accountCreatePhoneVerification) endpoint to send a confirmation SMS. \ No newline at end of file +Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST /account/verification/phone](/docs/references/cloud/client-web/account#createPhoneVerification) endpoint to send a confirmation SMS. \ No newline at end of file diff --git a/docs/references/avatars/get-browser.md b/docs/references/avatars/get-browser.md index 616439a470..8c1508a939 100644 --- a/docs/references/avatars/get-browser.md +++ b/docs/references/avatars/get-browser.md @@ -1,3 +1,3 @@ -You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET /account/sessions](/docs/client/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings. +You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET /account/sessions](/docs/references/cloud/client-web/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings. When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. \ No newline at end of file diff --git a/docs/references/teams/create-team-membership.md b/docs/references/teams/create-team-membership.md index ffa52b83c2..d1ae048af9 100644 --- a/docs/references/teams/create-team-membership.md +++ b/docs/references/teams/create-team-membership.md @@ -2,6 +2,6 @@ Invite a new member to join your team. Provide an ID for existing users, or invi You only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters. -Use the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](/docs/client/teams#teamsUpdateMembershipStatus) endpoint to allow the user to accept the invitation to the team. +Use the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](/docs/references/cloud/client-web/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team. Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console. diff --git a/docs/references/teams/get-team-prefs.md b/docs/references/teams/get-team-prefs.md index 25837f00e1..3cc4721f34 100644 --- a/docs/references/teams/get-team-prefs.md +++ b/docs/references/teams/get-team-prefs.md @@ -1 +1 @@ -Get the team's shared preferences by its unique ID. If a preference doesn't need to be shared by all team members, prefer storing them in [user preferences](/docs/client/account#accountGetPrefs). \ No newline at end of file +Get the team's shared preferences by its unique ID. If a preference doesn't need to be shared by all team members, prefer storing them in [user preferences](/docs/references/cloud/client-web/account#getPrefs). \ No newline at end of file diff --git a/docs/sdks/dart/CHANGELOG.md b/docs/sdks/dart/CHANGELOG.md index 5cfdeeeecb..ff86de6b76 100644 --- a/docs/sdks/dart/CHANGELOG.md +++ b/docs/sdks/dart/CHANGELOG.md @@ -183,7 +183,7 @@ - BREAKING Renamed users.deleteUser to users.delete - BREAKING Renamed parameter inviteId to membershipId on teams.updateMembershipStatus, teams.deleteMembership - JWT Support client.setJWT('JWT_GENERATED_IN_CLIENT') -- [Update membership roles](https://appwrite.io/docs/client/teams?sdk=dart#teamsUpdateMembershipRoles) +- [Update membership roles](https://appwrite.io/docs/references/cloud/server-dart/teams?sdk=dart#updateMembershipRoles) - New awesome image preview features, supports borderRadius, borderColor, borderWidth ## 0.5.0-dev.1 diff --git a/docs/sdks/flutter/CHANGELOG.md b/docs/sdks/flutter/CHANGELOG.md index ff079b82cc..6c6c7f9c9d 100644 --- a/docs/sdks/flutter/CHANGELOG.md +++ b/docs/sdks/flutter/CHANGELOG.md @@ -209,11 +209,11 @@ https://github.com/appwrite/appwrite/blob/master/CHANGES.md - Upgraded to Null-safety, minimum Dart SDK required 2.12.0 - Upgraded all underlying dependencies to null safe version - BREAKING Renamed parameter inviteId to membershipId on teams.updateMembershipStatus, teams.deleteMembership -- [Anonymous login](https://appwrite.io/docs/client/account?sdk=flutter#accountCreateAnonymousSession) -- [JWT Support](https://appwrite.io/docs/client/account?sdk=flutter#accountCreateJWT) +- [Anonymous login](https://appwrite.io/docs/references/cloud/client-flutter/account?sdk=flutter#createAnonymousSession) +- [JWT Support](https://appwrite.io/docs/references/cloud/client-flutter/account?sdk=flutter#createJWT) - Fallback Cookies for Flutter Web if 3rd party cookies are blocked - Custom User Agent Support -- [Update membership roles](https://appwrite.io/docs/client/teams?sdk=flutter#teamsUpdateMembershipRoles) +- [Update membership roles](https://appwrite.io/docs/references/cloud/client-flutter/teams?sdk=flutter#updateMembershipRoles) - New awesome image preview features, supports borderRadius, borderColor, borderWidth ## 0.5.0-dev.1 diff --git a/docs/services/account.md b/docs/services/account.md index 746493381f..7f337be136 100644 --- a/docs/services/account.md +++ b/docs/services/account.md @@ -1,8 +1,8 @@ The Account service allows you to authenticate and manage a user account. You can use the account service to update user information, retrieve the user sessions across different devices, and fetch the user security logs with his or her recent activity. -Register new user accounts with the [Create Account](/docs/client/account#accountCreate), [Create Magic URL session](/docs/client/account#accountCreateMagicURLSession), or [Create Phone session](/docs/client/account#accountCreatePhoneSession) endpoint. You can authenticate the user account by using multiple sign-in methods available. Once the user is authenticated, a new session object will be created to allow the user to access his or her private data and settings. +Register new user accounts with the [Create Account](/docs/references/cloud/client-web/account#create), [Create Magic URL session](/docs/references/cloud/client-web/account#createMagicURLSession), or [Create Phone session](/docs/references/cloud/client-web/account#createPhoneSession) endpoint. You can authenticate the user account by using multiple sign-in methods available. Once the user is authenticated, a new session object will be created to allow the user to access his or her private data and settings. -This service also exposes an endpoint to save and read the [user preferences](/docs/client/account#accountUpdatePrefs) as a key-value object. This feature is handy if you want to allow extra customization in your app. Common usage for this feature may include saving the user's preferred locale, timezone, or custom app theme. +This service also exposes an endpoint to save and read the [user preferences](/docs/references/cloud/client-web/account#updatePrefs) as a key-value object. This feature is handy if you want to allow extra customization in your app. Common usage for this feature may include saving the user's preferred locale, timezone, or custom app theme. > ## Account API vs Users API > While the Account API operates in the scope of the current logged-in user and usually using a client-side integration, the Users API is integrated from the server-side and operates in an admin scope with access to all your project users. diff --git a/docs/tutorials/add-oauth2-provider.md b/docs/tutorials/add-oauth2-provider.md index 734f199693..b3d81d1194 100644 --- a/docs/tutorials/add-oauth2-provider.md +++ b/docs/tutorials/add-oauth2-provider.md @@ -181,7 +181,7 @@ After you finished adding your new provider to Appwrite, you should be able to s Add credentials and check both a successful and a failed login (where the user denies integration on the provider page). -You can test your OAuth2 provider by trying to login using the [OAuth2 method](https://appwrite.io/docs/client/account#accountCreateOAuth2Session) when integrating the Appwrite Web SDK in a demo app. +You can test your OAuth2 provider by trying to login using the [OAuth2 method](https://appwrite.io/docs/references/cloud/client-web/account#createOAuth2Session) when integrating the Appwrite Web SDK in a demo app. Pass your new adapter name as the provider parameter. If login is successful, you will be redirected to your success URL parameter. Otherwise, you will be redirected to your failure URL. diff --git a/src/Appwrite/Migration/Migration.php b/src/Appwrite/Migration/Migration.php index 09f39d3169..2d0597dd26 100644 --- a/src/Appwrite/Migration/Migration.php +++ b/src/Appwrite/Migration/Migration.php @@ -68,6 +68,7 @@ abstract class Migration '1.4.1' => 'V19', '1.4.2' => 'V19', '1.4.3' => 'V19', + '1.4.4' => 'V19', ]; /** diff --git a/src/Appwrite/Platform/Tasks/Doctor.php b/src/Appwrite/Platform/Tasks/Doctor.php index 423dd78fe7..739a23aaf4 100644 --- a/src/Appwrite/Platform/Tasks/Doctor.php +++ b/src/Appwrite/Platform/Tasks/Doctor.php @@ -93,6 +93,12 @@ class Doctor extends Action Console::log('🟢 HTTPS force option is enabled'); } + if ('enabled' !== App::getEnv('_APP_OPTIONS_FUNCTIONS_FORCE_HTTPS', 'disabled')) { + Console::log('🔴 HTTPS force option is disabled for function domains'); + } else { + Console::log('🟢 HTTPS force option is enabled for function domains'); + } + $providerName = App::getEnv('_APP_LOGGING_PROVIDER', ''); $providerConfig = App::getEnv('_APP_LOGGING_CONFIG', ''); diff --git a/src/Appwrite/Utopia/Database/Validator/Queries/Base.php b/src/Appwrite/Utopia/Database/Validator/Queries/Base.php index 975f24ccf5..3eea7b7b7e 100644 --- a/src/Appwrite/Utopia/Database/Validator/Queries/Base.php +++ b/src/Appwrite/Utopia/Database/Validator/Queries/Base.php @@ -2,6 +2,7 @@ namespace Appwrite\Utopia\Database\Validator\Queries; +use Appwrite\Extend\Exception; use Utopia\Database\Validator\Queries; use Utopia\Database\Validator\Query\Limit; use Utopia\Database\Validator\Query\Offset; diff --git a/src/Executor/Executor.php b/src/Executor/Executor.php index 36f6ad0dc5..d81a4048c2 100644 --- a/src/Executor/Executor.php +++ b/src/Executor/Executor.php @@ -70,7 +70,7 @@ class Executor array $variables = [], string $command = null, ) { - $runtimeId = "$projectId-$deploymentId"; + $runtimeId = "$projectId-$deploymentId-build"; $route = "/runtimes"; $params = [ 'runtimeId' => $runtimeId, @@ -202,7 +202,9 @@ class Executor 'runtimeEntrypoint' => $runtimeEntrypoint, ]; - $timeout = (int) App::getEnv('_APP_FUNCTIONS_BUILD_TIMEOUT', 900); + // Safety timeout. Executor has timeout, and open runtime has soft timeout. + // This one shouldn't really happen, but prevents from unexpected networking behaviours. + $timeout = $timeout + 15; $response = $this->call(self::METHOD_POST, $route, [ 'x-opr-runtime-id' => $runtimeId ], $params, true, $timeout);