src/ShopifyApp/Services/ShopSession.php
public function setAccess(stdClass $access)
    {
        // Grab the token
        $token = $access->access_token;

        // Per-User
        if (property_exists($access, 'associated_user')) {
            // We have a user, so access will live only in session
            $this->user = $access->associated_user;

            $this->fixLifetime();
            Session::put(self::USER, $this->user);
            Session::put(self::TOKEN, $token);

            return;
        }

        // Offline
        $this->shop->{self::TOKEN} = $token;
        $this->shop->save();
    }
public function setAccess(stdClass $access)
    {
        // Grab the token
        $token = $access->access_token;

        // Per-User
        if (property_exists($access, 'associated_user')) {
            // We have a user, so access will live only in session
            $this->user = $access->associated_user;

            $this->fixLifetime();
            Session::put(self::USER, $this->user);
            Session::put(self::TOKEN, $token);

            return;
        }

        // Offline
        $this->shop->{self::TOKEN} = $token;
        $this->shop->save();
    }
Stores the access token and user (if any).
Uses database for acess token if it was an offline authentication.

@param stdClass $access

@return void