Skip to content

Using relative path will not automatically be resolved to a fully qualified URL. #109

@suasgn

Description

@suasgn

Issue / Motivation:

Using relative path will not automatically be resolved to a fully qualified URL.

I have try to modify SocialiteProviders/Manager but I have no idea to pass "SocialiteManager $socialite" to "SocialiteProviders\Manager\Config" class.

Expected behavior:

the redirect URI should resolved to a fully qualified URL

expected URI: "http://localhost/login/discord/callback"

Actual behavior:

Actual URI: "/login/discord/callback"

Steps to reproduce the behavior:

Do normal installation.

next, add credentials to "config/services.php" configuration file

'discord' => [
    'client_id' => env('DISCORD_APP_ID'),
    'client_secret' => env('DISCORD_SECRET'),
    'redirect' => '/login/discord/callback', 
], 

Proposed solution:

First, open "SocialiteProviders\Manager\SocialiteWasCalled" class.

my temporary solution is by comment "$provider->setConfig($config);" expression on method buildOAuth2Provider and buildOAuth1Provider.

protected function buildOAuth2Provider(SocialiteManager $socialite, $providerClass, $providerName)
{
    $this->classExtends($providerClass, \Laravel\Socialite\Two\AbstractProvider::class);

    $config = $this->getConfig($providerClass, $providerName);

    $provider = $socialite->buildProvider($providerClass, $config->get());

    // $provider->setConfig($config); <---- by comment this line

    return $provider;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions