Skip to content

Improve installer by adding extra OAuth fields to the model/migration stubs when OAuth is installed #1888

@iamdadmin

Description

@iamdadmin

Description

Per the documentation, the following fields are exposed from an OAuth user

$user = $this->oauth->fetchUser($code);

$user->id;         // The unique identifier for the user from the OAuth provider
$user->email;      // The user's email address
$user->name;       // The user's name
$user->nickname;   // The user's nickname/username
$user->avatar;     // The user's avatar URL
$user->provider;   // The OAuth provider name
$user->raw;        // Raw user data from the OAuth provider

When launching ./tempest install auth --oauth and the user chooses yes for migrations and user model, we could supply a stub with these additional fields.

Making the question Do you want to install OAuth? Yes/no the first question in the installer may be appropriate also, in the case of the --oauth value not being specifically passed.

Benefits

Smoother developer experience, as invariably this code would be required immediately anyway.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions