joelbutcher / socialstream

OAuth for Laravel, simplified.

Home Page:https://docs.socialstream.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RefreshToken for Google is not working

wassim opened this issue · comments

Stack

Breeze – React with Inertia

Package Version

v5.4

Laravel Version

v11

Livewire Version

No response

react Version

No response

Vue Version

No response

PHP Version

v8.3

Problem description

I'm getting an error while retrieving a token with Google as provider $user->getTokenFor('google')

ErrorException 

Declaration of JoelButcher\Socialstream\Concerns\RefreshesOAuth2Tokens::refreshToken(JoelButcher\Socialstream\ConnectedAccount $connectedAccount): JoelButcher\Socialstream\RefreshedCredentials must be compatible with Laravel\Socialite\Two\GoogleProvider::refreshToken($refreshToken)

Expected behavior

Successfully retrieve a user token with Google as provider

Steps to reproduce

$user = User::first();
$user->getTokenFor('google')

Reproduction repository

https://github.com/laravel/laravel

Relevant log output

No response

Hey @wassim! We're sorry to hear that you've hit this issue. 💙

However, it looks like you forgot to fill in the reproduction repository URL. Can you edit your original post and then we'll look at your issue?

We need a public GitHub repository which contains a Laravel app with the minimal amount of Socialstream code to reproduce the problem. Please do not link to your actual project, what we need instead is a minimal reproduction in a fresh project without any unnecessary code. This means it doesn't matter if your real project is private / confidential, since we want a link to a separate, isolated reproduction. That would allow us to download it and review your bug much easier, so it can be fixed quicker. Please make sure to include a database seeder with everything we need to set the app up quickly.

Thank you for providing reproduction steps! Reopening the issue now.

Hey @wassim thanks for reporting your issue, however I can see that you've not provided a valid reproduction repository URL.

Unfortunately, I don't have time to build out a new project for each bug report.

Please provide a valid reproduction repository URL with steps required to reproduce that error. If possible, please provide a staging, or live testing environment with debug enabled so so can see a stack trace of the exact error you're getting in your APM / logs.

Thanks!