Skip to content

Commit

Permalink
Merge branch 'refactor-usage-sn' of github.com:appwrite/appwrite into…
Browse files Browse the repository at this point in the history
… exteand-deletes-worker
  • Loading branch information
shimonewman committed Jun 16, 2024
2 parents 5fefa40 + e195018 commit e2012a0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ENV VITE_APPWRITE_GROWTH_ENDPOINT=$VITE_APPWRITE_GROWTH_ENDPOINT
RUN npm ci
RUN npm run build

FROM appwrite/base:0.9.0 as final
FROM appwrite/base:0.9.1 as final

LABEL maintainer="[email protected]"

Expand Down
6 changes: 3 additions & 3 deletions app/config/platforms.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
[
'key' => 'web',
'name' => 'Web',
'version' => '14.0.2',
'version' => '15.0.0',
'url' => 'https://github.com/appwrite/sdk-for-web',
'package' => 'https://www.npmjs.com/package/appwrite',
'enabled' => true,
Expand Down Expand Up @@ -138,7 +138,7 @@
[
'key' => 'react-native',
'name' => 'React Native',
'version' => '0.3.2',
'version' => '0.4.0',
'url' => 'https://github.com/appwrite/sdk-for-react-native',
'package' => 'https://npmjs.com/package/react-native-appwrite',
'enabled' => true,
Expand Down Expand Up @@ -267,7 +267,7 @@
[
'key' => 'deno',
'name' => 'Deno',
'version' => '10.0.2',
'version' => '11.0.0',
'url' => 'https://github.com/appwrite/sdk-for-deno',
'package' => 'https://deno.land/x/appwrite',
'enabled' => true,
Expand Down
7 changes: 4 additions & 3 deletions app/controllers/api/account.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@
$factor = (match ($verifiedToken->getAttribute('type')) {
Auth::TOKEN_TYPE_MAGIC_URL,
Auth::TOKEN_TYPE_OAUTH2,
Auth::TOKEN_TYPE_EMAIL => 'email',
Auth::TOKEN_TYPE_PHONE => 'phone',
Auth::TOKEN_TYPE_EMAIL => Type::EMAIL,
Auth::TOKEN_TYPE_PHONE => Type::PHONE,
Auth::TOKEN_TYPE_GENERIC => 'token',
default => throw new Exception(Exception::USER_INVALID_TOKEN)
});
Expand Down Expand Up @@ -1506,7 +1506,7 @@
'secret' => Auth::hash($secret), // One way hash encryption to protect DB leak
'userAgent' => $request->getUserAgent('UNKNOWN'),
'ip' => $request->getIP(),
'factors' => ['email'],
'factors' => [TYPE::EMAIL, 'oauth2'], // include a special oauth2 factor to bypass MFA checks
'countryCode' => ($record) ? \strtolower($record['country']['iso_code']) : '--',
'expire' => DateTime::addSeconds(new \DateTime(), $duration)
], $detector->getOS(), $detector->getClient(), $detector->getDevice()));
Expand Down Expand Up @@ -2524,6 +2524,7 @@
->label('sdk.response.model', Response::MODEL_USER)
->label('sdk.offline.model', '/account')
->label('sdk.offline.key', 'current')
->label('abuse-limit', 10)
->param('password', '', fn ($project, $passwordsDictionary) => new PasswordDictionary($passwordsDictionary, $project->getAttribute('auths', [])['passwordDictionary'] ?? false), 'New user password. Must be at least 8 chars.', false, ['project', 'passwordsDictionary'])
->param('oldPassword', '', new Password(), 'Current user password. Must be at least 8 chars.', true)
->inject('requestTimestamp')
Expand Down
2 changes: 1 addition & 1 deletion docs/references/account/update-mfa-authenticator.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Verify an authenticator app after adding it using the [add authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator) method. add
Verify an authenticator app after adding it using the [add authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator) method.

0 comments on commit e2012a0

Please sign in to comment.