Skip to content

UserOauth ​

File: src/Entities/UserOauth.php
Namespace: Unusualify\Modularous\Entities
Extends: Illuminate\Database\Eloquent\Model

Stores an OAuth provider link for a user. Each record represents one linked provider (e.g. Google, GitHub) with the provider's unique ID and access token.

Fillable Attributes ​

AttributeTypeDescription
tokenstringOAuth access token
providerstringProvider name (e.g. google, github)
avatarstringAvatar URL from the provider
oauth_idstringProvider-specific user ID
user_idintOwning user

Relationships ​

user(): BelongsTo ​

The Modularous user this OAuth link belongs to.

Table ​

Resolved from modularous.tables.user_oauths, defaults to um_user_oauths.

  • User — parent user model
  • HasOauth entity trait — adds OAuth methods to the User model
  • LoginController — OAuth authentication flow