Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Third party cookie restrictions #1

Open
github-actions bot opened this issue Feb 8, 2025 · 0 comments
Open

Third party cookie restrictions #1

github-actions bot opened this issue Feb 8, 2025 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@github-actions
Copy link

github-actions bot commented Feb 8, 2025

There has been

[some discussion](https://stackoverflow\.com/a/67688369/294171\)

about how to handle the third party cookies inherent in `iframe` resource

placements, with people leaning towards partitioned cookies (the

Chrome/Firefox solution), but referencing the pain of getting a working

work-around for Safari.

* FIXME Third party cookie restrictions
* There has been
* [some discussion](https://stackoverflow.com/a/67688369/294171)
* about how to handle the third party cookies inherent in `iframe` resource
* placements, with people leaning towards partitioned cookies (the
* Chrome/Firefox solution), but referencing the pain of getting a working
* work-around for Safari.
*/

<?php

declare(strict_types=1);

namespace GrotonSchool\SlimLTI\GAE\Infrastructure;

use Packback\Lti1p3\Interfaces\ICookie;

/**
 * @see https://github.com/packbackbooks/lti-1-3-php-library/wiki/Laravel-Implementation-Guide#cookie Working from Packback's wiki example
 *
 * FIXME Third party cookie restrictions
 *   There has been
 *   [some discussion](https://stackoverflow.com/a/67688369/294171)
 *   about how to handle the third party cookies inherent in `iframe` resource
 *   placements, with people leaning towards partitioned cookies (the
 *   Chrome/Firefox solution), but referencing the pain of getting a working
 *   work-around for Safari.
 */
class Cookie implements ICookie
{
    public function getCookie(string $name): ?string
    {
        return $_COOKIE[$name];
    }

    public function setCookie(
        string $name,
        string $value,
        int $exp = 3600,
        array $options = []
    ): void {
        setcookie($name, $value, $exp, ...$options);
    }
}
@github-actions github-actions bot added the bug Something isn't working label Feb 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant