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

Upgrade firebase/php-jwt #223

Open
wants to merge 3 commits into
base: 3.x
Choose a base branch
from
Open

Upgrade firebase/php-jwt #223

wants to merge 3 commits into from

Conversation

tuupola
Copy link
Owner

@tuupola tuupola commented May 20, 2022

No description provided.

Comment on lines +127 to +130
$this->key[$key] = new Key($secret, "HS256");
}
} else {
$this->key = new Key($this->options["secret"], "HS256");
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of hard-coding "HS256" you should use the algorithm in $options

        if (is_array($this->options["secret"])) {
            foreach ($this->options["secret"] as $key => $secret) {
                $this->key[$key] = new Key($secret, $this->options["algorithm"][0] ?? "HS256");
            }
        } else {
            $this->key = new Key($this->options["secret"], $this->options["algorithm"][0] ?? "HS256");
        }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants