-
-
Notifications
You must be signed in to change notification settings - Fork 600
Closed
Description
Bug Description
Issue when integrating OAuth with different services such as Github. Note that I'm using database for the User instead of Stache. Looking at the Stache\UserRepository, it seems the findByOAuthId() is implemented correctly.
The error message is
TypeError Return value of Statamic\Auth\Eloquent\UserRepository::findByOAuthId() must be an instance of Statamic\Contracts\Auth\User or null, none returned
How to Reproduce
I followed the steps on the Statamic OAuth page
- Added oauth provider to statmic/oauth.php
- Add provider credential to config/services.php
- Update config/statamic/oauth.php with the service
- Add login redirect route and callback route in config/statamic/oauth.php.
- Try to login using Github from CP or try logging in with {{ oauth:github }} from frontend.
Extra Detail
Environment
Statamic version: 3.0.0 Pro
PHP version: 7.3.21
Install method (choose one):
- Fresh install from
statamic/statamic
1stevengrant
Metadata
Metadata
Assignees
Labels
No labels

