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: can disable new user registration at /user/login API around w3up launch by setting NEXT_PUBLIC_W3UP_LAUNCH_LIMITED_AVAILABILITY_START #2324

Merged
merged 17 commits into from
Nov 13, 2023

Conversation

gobengo
Copy link
Contributor

@gobengo gobengo commented Nov 10, 2023

Motivation:

What

  • now that some stuff is needed as common between the two packages for api and website, I moved the w3up-launch module into a new package that both can depend on @web3-storage/w3up-launch
  • @web3-storage/api loginOrRegister reads env.NEXT_PUBLIC_W3UP_LAUNCH_LIMITED_AVAILABILITY_START and if its after that, will throw an error when it would otherwise create a new user.
  • website 'callback' page from magic link detects the error from POST /user/login indicating this and redirects user to /login/signups-closed/try-w3up/

@gobengo gobengo requested review from a team as code owners November 10, 2023 21:22
@gobengo gobengo changed the title feat: can disable new user registration around w3up launch by setting NEXT_PUBLIC_W3UP_LAUNCH_LIMITED_AVAILABILITY_START feat: can disable new user registration at /user/login API around w3up launch by setting NEXT_PUBLIC_W3UP_LAUNCH_LIMITED_AVAILABILITY_START Nov 10, 2023
… and redirects to new page /login/signups-closed/try-w3up/
…le in website to avoid headaches with jsx in api mocha
Copy link
Contributor

github-actions bot commented Nov 11, 2023

@gobengo
Copy link
Contributor Author

gobengo commented Nov 11, 2023

I tested on the preview link (https://b1bf40ff.web3-storage-staging.pages.dev) and was able to sign in just fine. This is as expected, because the preview link doesn't have the limited availability mode enabled. I'll enable it on staging once we merge this and test there

@gobengo gobengo self-assigned this Nov 11, 2023
@gobengo gobengo merged commit 09a59c6 into main Nov 13, 2023
22 checks passed
@gobengo gobengo deleted the rm-new-user-api-1699488141 branch November 13, 2023 17:31
@gobengo
Copy link
Contributor Author

gobengo commented Nov 13, 2023

this seems to be working well on staging

gobengo pushed a commit that referenced this pull request Nov 13, 2023
🤖 I have created a release *beep* *boop*
---


##
[7.21.0](api-v7.20.0...api-v7.21.0)
(2023-11-13)


### Features

* can disable new user registration at /user/login API around w3up
launch by setting `NEXT_PUBLIC_W3UP_LAUNCH_LIMITED_AVAILABILITY_START`
([#2324](#2324))
([09a59c6](09a59c6))

---
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>
gobengo pushed a commit that referenced this pull request Nov 13, 2023
🤖 I have created a release *beep* *boop*
---


##
[2.38.0](website-v2.37.0...website-v2.38.0)
(2023-11-13)


### Features

* /account/payment disables changing plans after scheduled sunset date
([#2321](#2321))
([22799fe](22799fe))
* can disable new user registration at /user/login API around w3up
launch by setting `NEXT_PUBLIC_W3UP_LAUNCH_LIMITED_AVAILABILITY_START`
([#2324](#2324))
([09a59c6](09a59c6))

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