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: clean up test setup in MFA tests #1452

Merged
merged 3 commits into from
Mar 3, 2024
Merged

feat: clean up test setup in MFA tests #1452

merged 3 commits into from
Mar 3, 2024

Conversation

J0
Copy link
Contributor

@J0 J0 commented Feb 26, 2024

What kind of change does this PR introduce?

Remove redundant test setup, particularly around TestSecondarySession.

  • Changes generateToken into generateAAL1Token
  • Abstracts adding the claim and reloading a session into a single method. Was probably a mistake to add AMREntry. Should sync to use AMRClaim at some point
  • Add additional check that a provider fields must exist if there's an SSO Claim on the last entry

@J0 J0 requested a review from a team as a code owner February 26, 2024 04:05
@J0 J0 merged commit 7185af8 into master Mar 3, 2024
4 checks passed
@J0 J0 deleted the j0/refactor_mfa_tests branch March 3, 2024 06:11
hf pushed a commit that referenced this pull request Mar 5, 2024
🤖 I have created a release *beep* *boop*
---


##
[2.144.0](v2.143.0...v2.144.0)
(2024-03-04)


### Features

* add configuration for custom sms sender hook
([#1428](#1428))
([1ea56b6](1ea56b6))
* anonymous sign-ins
([#1460](#1460))
([130df16](130df16))
* clean up test setup in MFA tests
([#1452](#1452))
([7185af8](7185af8))
* pass transaction to `invokeHook`, fixing pool exhaustion
([#1465](#1465))
([b536d36](b536d36))
* refactor resource owner password grant
([#1443](#1443))
([e63ad6f](e63ad6f))
* use dummy instance id to improve performance on refresh token queries
([#1454](#1454))
([656474e](656474e))


### Bug Fixes

* expose `provider` under `amr` in access token
([#1456](#1456))
([e9f38e7](e9f38e7))
* improve MFA QR Code resilience so as to support providers like
1Password ([#1455](#1455))
([6522780](6522780))
* refactor request params to use generics
([#1464](#1464))
([e1cdf5c](e1cdf5c))
* revert refactor resource owner password grant
([#1466](#1466))
([fa21244](fa21244))
* update file name so migration to Drop IP Address is applied
([#1447](#1447))
([f29e89d](f29e89d))

---
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>
uxodb pushed a commit to uxodb/auth that referenced this pull request Nov 13, 2024
## What kind of change does this PR introduce?

Remove redundant test setup, particularly around `TestSecondarySession`.
- Changes `generateToken` into `generateAAL1Token`
- Abstracts adding the claim and reloading a session into a single
method. Was probably a mistake to add
[AMREntry](https://github.com/supabase/gotrue/blob/e9f38e76d8a7b93c5c2bb0de918a9b156155f018/internal/models/sessions.go#L38).
Should sync to use
[AMRClaim](https://github.com/supabase/gotrue/blob/e9f38e76d8a7b93c5c2bb0de918a9b156155f018/internal/models/amr.go)
at some point
- Add additional check that a provider fields must exist if there's an
SSO Claim on the last entry

---------

Co-authored-by: joel <joel@joels-MacBook-Pro.local>
uxodb pushed a commit to uxodb/auth that referenced this pull request Nov 13, 2024
🤖 I have created a release *beep* *boop*
---


##
[2.144.0](supabase/auth@v2.143.0...v2.144.0)
(2024-03-04)


### Features

* add configuration for custom sms sender hook
([supabase#1428](supabase#1428))
([1ea56b6](supabase@1ea56b6))
* anonymous sign-ins
([supabase#1460](supabase#1460))
([130df16](supabase@130df16))
* clean up test setup in MFA tests
([supabase#1452](supabase#1452))
([7185af8](supabase@7185af8))
* pass transaction to `invokeHook`, fixing pool exhaustion
([supabase#1465](supabase#1465))
([b536d36](supabase@b536d36))
* refactor resource owner password grant
([supabase#1443](supabase#1443))
([e63ad6f](supabase@e63ad6f))
* use dummy instance id to improve performance on refresh token queries
([supabase#1454](supabase#1454))
([656474e](supabase@656474e))


### Bug Fixes

* expose `provider` under `amr` in access token
([supabase#1456](supabase#1456))
([e9f38e7](supabase@e9f38e7))
* improve MFA QR Code resilience so as to support providers like
1Password ([supabase#1455](supabase#1455))
([6522780](supabase@6522780))
* refactor request params to use generics
([supabase#1464](supabase#1464))
([e1cdf5c](supabase@e1cdf5c))
* revert refactor resource owner password grant
([supabase#1466](supabase#1466))
([fa21244](supabase@fa21244))
* update file name so migration to Drop IP Address is applied
([supabase#1447](supabase#1447))
([f29e89d](supabase@f29e89d))

---
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>
LashaJini pushed a commit to LashaJini/auth that referenced this pull request Nov 13, 2024
## What kind of change does this PR introduce?

Remove redundant test setup, particularly around `TestSecondarySession`.
- Changes `generateToken` into `generateAAL1Token`
- Abstracts adding the claim and reloading a session into a single
method. Was probably a mistake to add
[AMREntry](https://github.com/supabase/gotrue/blob/e9f38e76d8a7b93c5c2bb0de918a9b156155f018/internal/models/sessions.go#L38).
Should sync to use
[AMRClaim](https://github.com/supabase/gotrue/blob/e9f38e76d8a7b93c5c2bb0de918a9b156155f018/internal/models/amr.go)
at some point
- Add additional check that a provider fields must exist if there's an
SSO Claim on the last entry

---------

Co-authored-by: joel <joel@joels-MacBook-Pro.local>
LashaJini pushed a commit to LashaJini/auth that referenced this pull request Nov 13, 2024
🤖 I have created a release *beep* *boop*
---


##
[2.144.0](supabase/auth@v2.143.0...v2.144.0)
(2024-03-04)


### Features

* add configuration for custom sms sender hook
([supabase#1428](supabase#1428))
([1ea56b6](supabase@1ea56b6))
* anonymous sign-ins
([supabase#1460](supabase#1460))
([130df16](supabase@130df16))
* clean up test setup in MFA tests
([supabase#1452](supabase#1452))
([7185af8](supabase@7185af8))
* pass transaction to `invokeHook`, fixing pool exhaustion
([supabase#1465](supabase#1465))
([b536d36](supabase@b536d36))
* refactor resource owner password grant
([supabase#1443](supabase#1443))
([e63ad6f](supabase@e63ad6f))
* use dummy instance id to improve performance on refresh token queries
([supabase#1454](supabase#1454))
([656474e](supabase@656474e))


### Bug Fixes

* expose `provider` under `amr` in access token
([supabase#1456](supabase#1456))
([e9f38e7](supabase@e9f38e7))
* improve MFA QR Code resilience so as to support providers like
1Password ([supabase#1455](supabase#1455))
([6522780](supabase@6522780))
* refactor request params to use generics
([supabase#1464](supabase#1464))
([e1cdf5c](supabase@e1cdf5c))
* revert refactor resource owner password grant
([supabase#1466](supabase#1466))
([fa21244](supabase@fa21244))
* update file name so migration to Drop IP Address is applied
([supabase#1447](supabase#1447))
([f29e89d](supabase@f29e89d))

---
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>
LashaJini pushed a commit to LashaJini/auth that referenced this pull request Nov 15, 2024
## What kind of change does this PR introduce?

Remove redundant test setup, particularly around `TestSecondarySession`.
- Changes `generateToken` into `generateAAL1Token`
- Abstracts adding the claim and reloading a session into a single
method. Was probably a mistake to add
[AMREntry](https://github.com/supabase/gotrue/blob/e9f38e76d8a7b93c5c2bb0de918a9b156155f018/internal/models/sessions.go#L38).
Should sync to use
[AMRClaim](https://github.com/supabase/gotrue/blob/e9f38e76d8a7b93c5c2bb0de918a9b156155f018/internal/models/amr.go)
at some point
- Add additional check that a provider fields must exist if there's an
SSO Claim on the last entry

---------

Co-authored-by: joel <joel@joels-MacBook-Pro.local>
LashaJini pushed a commit to LashaJini/auth that referenced this pull request Nov 15, 2024
🤖 I have created a release *beep* *boop*
---


##
[2.144.0](supabase/auth@v2.143.0...v2.144.0)
(2024-03-04)


### Features

* add configuration for custom sms sender hook
([supabase#1428](supabase#1428))
([1ea56b6](supabase@1ea56b6))
* anonymous sign-ins
([supabase#1460](supabase#1460))
([130df16](supabase@130df16))
* clean up test setup in MFA tests
([supabase#1452](supabase#1452))
([7185af8](supabase@7185af8))
* pass transaction to `invokeHook`, fixing pool exhaustion
([supabase#1465](supabase#1465))
([b536d36](supabase@b536d36))
* refactor resource owner password grant
([supabase#1443](supabase#1443))
([e63ad6f](supabase@e63ad6f))
* use dummy instance id to improve performance on refresh token queries
([supabase#1454](supabase#1454))
([656474e](supabase@656474e))


### Bug Fixes

* expose `provider` under `amr` in access token
([supabase#1456](supabase#1456))
([e9f38e7](supabase@e9f38e7))
* improve MFA QR Code resilience so as to support providers like
1Password ([supabase#1455](supabase#1455))
([6522780](supabase@6522780))
* refactor request params to use generics
([supabase#1464](supabase#1464))
([e1cdf5c](supabase@e1cdf5c))
* revert refactor resource owner password grant
([supabase#1466](supabase#1466))
([fa21244](supabase@fa21244))
* update file name so migration to Drop IP Address is applied
([supabase#1447](supabase#1447))
([f29e89d](supabase@f29e89d))

---
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>
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.

2 participants