public function auth()
    {
        $spotify = app()
            ->make('SpotifyWrapper', [
                'callback' => '/nova-vendor/nova-spotify-auth-tool/auth',
                'scope' => [],
                'show_dialog' => true,
            ])
            ->requestAccessToken();

        $spotify->api->setAccessToken($spotify->session->getAccessToken());

        Spotify::updateOrCreate(
            ['key' => 'user_id'],
            ['value' => $spotify->api->me()->id]
        );

        Spotify::updateOrCreate(
            ['key' => 'refresh_token'],
            ['value' => $spotify->session->getRefreshToken()]
        );

        return redirect('nova/nova-spotify-auth-tool');
    }
public function auth()
    {
        $spotify = app()
            ->make('SpotifyWrapper', [
                'callback' => '/nova-vendor/nova-spotify-auth-tool/auth',
                'scope' => [],
                'show_dialog' => true,
            ])
            ->requestAccessToken();

        $spotify->api->setAccessToken($spotify->session->getAccessToken());

        Spotify::updateOrCreate(
            ['key' => 'user_id'],
            ['value' => $spotify->api->me()->id]
        );

        Spotify::updateOrCreate(
            ['key' => 'refresh_token'],
            ['value' => $spotify->session->getRefreshToken()]
        );

        return redirect('nova/nova-spotify-auth-tool');
    }
public function auth ( ) { $ spotify = app ( ) -> make ( 'SpotifyWrapper' , [ 'callback' => '/nova-vendor/nova-spotify-auth-tool/auth' , 'scope' => [ ] , 'show_dialog' => true , ] ) -> requestAccessToken ( ) ; $ spotify -> api -> setAccessToken ( $ spotify -> session -> getAccessToken ( ) ) ; Spotify :: updateOrCreate ( [ 'key' => 'user_id' ] , [ 'value' => $ spotify -> api -> me ( ) -> id ] ) ; Spotify :: updateOrCreate ( [ 'key' => 'refresh_token' ] , [ 'value' => $ spotify -> session -> getRefreshToken ( ) ] ) ; return redirect ( 'nova/nova-spotify-auth-tool' ) ; }
Spotify authentication.

@return mixed
Spotify authentication .