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

feat: refactor generate accesss token to take in request #1531

Merged
merged 2 commits into from
Apr 12, 2024

Conversation

J0
Copy link
Contributor

@J0 J0 commented Apr 12, 2024

What kind of change does this PR introduce?

In support of the use of HTTP Hook with Custom Access Token Extension Point.

We need to take in a request in order to support the Custom Access Token Hook. We use the request in the Custom access hook depends on the request to fetch the global logger. We refactor generateAccessToken and a wrapping method, issueRefreshToken, to take in a request to support this.

We also add a dummy request to the tests to support this change. Supports #1528 - branched out as a separate PR so as not to bloat the main PR with peripheral changes.

@J0 J0 requested a review from a team as a code owner April 12, 2024 06:35
internal/api/identity_test.go Outdated Show resolved Hide resolved
internal/api/logout_test.go Outdated Show resolved Hide resolved
internal/api/phone_test.go Outdated Show resolved Hide resolved
@coveralls
Copy link

coveralls commented Apr 12, 2024

Pull Request Test Coverage Report for Build 8658079027

Details

  • 13 of 15 (86.67%) changed or added relevant lines in 8 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.003%) to 65.179%

Changes Missing Coverage Covered Lines Changed/Added Lines %
internal/api/samlacs.go 0 1 0.0%
internal/api/token_oidc.go 0 1 0.0%
Totals Coverage Status
Change from base Build 8628290024: 0.003%
Covered Lines: 8060
Relevant Lines: 12366

💛 - Coveralls

@J0 J0 merged commit e4f2b59 into master Apr 12, 2024
4 checks passed
@J0 J0 deleted the j0/refactor_generate_access_token_to_accept_request branch April 12, 2024 08:04
kangmingtay pushed a commit that referenced this pull request Apr 15, 2024
🤖 I have created a release *beep* *boop*
---


##
[2.149.0](v2.148.0...v2.149.0)
(2024-04-15)


### Features

* refactor generate accesss token to take in request
([#1531](#1531))
([e4f2b59](e4f2b59))


### Bug Fixes

* linkedin_oidc provider error
([#1534](#1534))
([4f5e8e5](4f5e8e5))
* revert patch for linkedin_oidc provider error
([#1535](#1535))
([58ef4af](58ef4af))
* update linkedin issuer url
([#1536](#1536))
([10d6d8b](10d6d8b))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
J0 added a commit that referenced this pull request Apr 15, 2024
Combination of multiple commits. More context below:

Fixes #1533

Attempting to signInWithOAuth with linkedin_iodc provider results in
error 500

Attempting to signInWithOAuth with linkedin_iodc results in a successful
login

Error from Supabase Auth Logs:
`oidc: id token issued by a different provider, expected
\"https://www.linkedin.com\" got \"https://www.linkedin.com/oauth\"`

fix: revert patch for linkedin_oidc provider error (#1535)

Reverts #1534

Doesn't seem to work as expected. Directly testing against the API by
calling `https://localhost:9999/?provider=linkedin_oidc will return a
404 error.

fix: update linkedin issuer url (#1536)

* Linkedin introduced a breaking change by changing the issuer url in
their
discover document from `https://linkedin.com` to
`https://linkedin.com/oauth`

* Fixes #1533, #1534,
[#22711](https://github.com/orgs/supabase/discussions/22711),
[#22708](https://github.com/orgs/supabase/discussions/22708)

Please link any relevant issues here.

Feel free to include screenshots if it includes visual changes.

Add any other context or screenshots.

chore(master): release 2.149.0 (#1532)

:robot: I have created a release *beep* *boop*
---

[2.149.0](v2.148.0...v2.149.0)
(2024-04-15)

* refactor generate accesss token to take in request
([#1531](#1531))
([e4f2b59](e4f2b59))

* linkedin_oidc provider error
([#1534](#1534))
([4f5e8e5](4f5e8e5))
* revert patch for linkedin_oidc provider error
([#1535](#1535))
([58ef4af](58ef4af))
* update linkedin issuer url
([#1536](#1536))
([10d6d8b](10d6d8b))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

Revert "Merge branch 'master' into j0/allow_postgres_and_http_on_extensibility_point"

This reverts commit 4311d7e, reversing
changes made to 32fd777.
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

3 participants