1
0
Fork 0
mirror of synced 2024-07-04 14:10:33 +12:00

Remove identity status

Until we have a clearer picture of why we need it, it would be best to
remove it since it's easier to add it later than to remove it after it's
released.
This commit is contained in:
Steven Nguyen 2023-08-02 15:22:52 -07:00
parent bcd44432d1
commit cb7abdb906
No known key found for this signature in database
4 changed files with 0 additions and 27 deletions

View file

@ -2045,17 +2045,6 @@ $collections = [
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('status'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 256,
'signed' => true,
'required' => true,
'default' => 'connected',
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('providerUid'),
'type' => Database::VAR_STRING,
@ -2148,13 +2137,6 @@ $collections = [
'lengths' => [100],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_status'),
'type' => Database::INDEX_KEY,
'attributes' => ['status'],
'lengths' => [Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_providerUid'),
'type' => Database::INDEX_KEY,

View file

@ -697,7 +697,6 @@ App::get('/v1/account/sessions/oauth2/:provider/redirect')
'userInternalId' => $user->getInternalId(),
'userId' => $userId,
'provider' => $provider,
'status' => 'connected',
'providerUid' => $oauth2ID,
'providerEmail' => $email,
'providerAccessToken' => $accessToken,
@ -706,7 +705,6 @@ App::get('/v1/account/sessions/oauth2/:provider/redirect')
]));
} else {
$identity
->setAttribute('status', 'connected')
->setAttribute('providerAccessToken', $accessToken)
->setAttribute('providerRefreshToken', $refreshToken)
->setAttribute('providerAccessTokenExpiry', DateTime::addSeconds(new \DateTime(), (int)$accessTokenExpiry));

View file

@ -7,7 +7,6 @@ class Identities extends Base
public const ALLOWED_ATTRIBUTES = [
'userId',
'provider',
'status',
'providerUid',
'providerEmail',
];

View file

@ -40,12 +40,6 @@ class Identity extends Model
'default' => '',
'example' => 'email',
])
->addRule('status', [
'type' => self::TYPE_STRING,
'description' => 'Connection status. Can be connected or disconnected',
'default' => '',
'example' => 'connected',
])
->addRule('providerUid', [
'type' => self::TYPE_STRING,
'description' => 'ID of the User in the Identity Provider.',