-
Notifications
You must be signed in to change notification settings - Fork 15
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
Orion signup flow rework #321
Merged
zeeshanakram3
merged 25 commits into
Joystream:api-free-signup
from
zeeshanakram3:orion_signup-flow-rework
Aug 3, 2024
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
e2db206
Add graphql schema changes
zeeshanakram3 9289462
regenerate DB migrations
zeeshanakram3 1cd57ba
opdate openapi.yaml file
zeeshanakram3 6324de8
updated authHandler function
zeeshanakram3 65f5e20
remove /confirm-email auth api endpoint
zeeshanakram3 42f9b10
[auth-api] update /change-account endpoint implementation
zeeshanakram3 6c8de7a
[auth-api] update create account endpoint
zeeshanakram3 8b441ec
[auth-api] update /request-email-confirmation-token endpoint
zeeshanakram3 4bd1731
update mappings due to schema changes
zeeshanakram3 86c0ff0
update custon resolvers due to schema changes
zeeshanakram3 e2efa92
added createAccountMembership custom mutation
zeeshanakram3 b0daecb
update auth-server, mail scheduler and notification tests
zeeshanakram3 bb8f989
update auth-api docs
zeeshanakram3 3751a3f
Merge remote-tracking branch 'upstream/master' into orion_signup-flow…
zeeshanakram3 1389dfc
small refactor
zeeshanakram3 3a93392
fix: auth-api unit tests
zeeshanakram3 556ca20
fix: lint errors
zeeshanakram3 2fba0a5
move encryption_artifacts & session_encryption_artifacts to admin schema
zeeshanakram3 d580268
bump package version
zeeshanakram3 1be0059
fix: Members.MemberAccountsUpdated mappings bug
zeeshanakram3 3bfb7fd
[offchainState] add v5.0.0 migrations
zeeshanakram3 d872193
rename joystreamAccount to joystreamAccountId in 'AccountData' graphq…
zeeshanakram3 4dc02c5
Merge remote-tracking branch 'upstream/master' into orion_signup-flow…
zeeshanakram3 728fd8a
add 'signupType' param to email confirmation link
zeeshanakram3 f915348
Merge remote-tracking branch 'upstream/master' into orion_signup-flow…
zeeshanakram3 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
module.exports = class Data1722676430400 { | ||
name = 'Data1722676430400' | ||
|
||
async up(db) { | ||
await db.query(`ALTER TABLE "admin"."account" DROP CONSTRAINT "FK_601b93655bcbe73cb58d8c80cd3"`) | ||
await db.query(`DROP INDEX "admin"."IDX_601b93655bcbe73cb58d8c80cd"`) | ||
await db.query(`DROP INDEX "admin"."IDX_df4da05a7a80c1afd18b8f0990"`) | ||
await db.query(`ALTER TABLE "membership" RENAME COLUMN "controller_account" TO "controller_account_id"`) | ||
await db.query(`CREATE TABLE "blockchain_account" ("id" character varying NOT NULL, CONSTRAINT "PK_3d07d692a436bc34ef4093d9c60" PRIMARY KEY ("id"))`) | ||
await db.query(`CREATE TABLE "admin"."email_confirmation_token" ("id" character varying NOT NULL, "issued_at" TIMESTAMP WITH TIME ZONE NOT NULL, "expiry" TIMESTAMP WITH TIME ZONE NOT NULL, "email" text NOT NULL, CONSTRAINT "PK_2fa8d5586af7e96201b84492131" PRIMARY KEY ("id"))`) | ||
await db.query(`ALTER TABLE "admin"."account" DROP COLUMN "is_email_confirmed"`) | ||
await db.query(`ALTER TABLE "admin"."account" DROP CONSTRAINT "Account_membership"`) | ||
await db.query(`ALTER TABLE "admin"."account" DROP COLUMN "membership_id"`) | ||
await db.query(`ALTER TABLE "admin"."account" DROP CONSTRAINT "Account_joystreamAccount"`) | ||
await db.query(`ALTER TABLE "admin"."account" DROP COLUMN "joystream_account"`) | ||
await db.query(`ALTER TABLE "admin"."account" DROP COLUMN "referrer_channel_id"`) | ||
await db.query(`ALTER TABLE "admin"."account" ADD "joystream_account_id" character varying NOT NULL`) | ||
await db.query(`ALTER TABLE "admin"."account" ADD CONSTRAINT "UQ_90debbc4217372d2464201c576a" UNIQUE ("joystream_account_id")`) | ||
await db.query(`ALTER TABLE "membership" DROP COLUMN "controller_account_id"`) | ||
await db.query(`ALTER TABLE "membership" ADD "controller_account_id" character varying`) | ||
await db.query(`CREATE INDEX "IDX_58492b909a36e6a3e4dabd4674" ON "membership" ("controller_account_id") `) | ||
await db.query(`CREATE INDEX "IDX_90debbc4217372d2464201c576" ON "admin"."account" ("joystream_account_id") `) | ||
await db.query(`ALTER TABLE "membership" ADD CONSTRAINT "FK_58492b909a36e6a3e4dabd46743" FOREIGN KEY ("controller_account_id") REFERENCES "blockchain_account"("id") ON DELETE NO ACTION ON UPDATE NO ACTION DEFERRABLE INITIALLY DEFERRED`) | ||
await db.query(`ALTER TABLE "admin"."account" ADD CONSTRAINT "FK_90debbc4217372d2464201c576a" FOREIGN KEY ("joystream_account_id") REFERENCES "blockchain_account"("id") ON DELETE NO ACTION ON UPDATE NO ACTION DEFERRABLE INITIALLY DEFERRED`) | ||
} | ||
|
||
async down(db) { | ||
await db.query(`ALTER TABLE "admin"."account" ADD CONSTRAINT "FK_601b93655bcbe73cb58d8c80cd3" FOREIGN KEY ("membership_id") REFERENCES "membership"("id") ON DELETE NO ACTION ON UPDATE NO ACTION DEFERRABLE INITIALLY DEFERRED`) | ||
await db.query(`CREATE INDEX "IDX_601b93655bcbe73cb58d8c80cd" ON "admin"."account" ("membership_id") `) | ||
await db.query(`CREATE INDEX "IDX_df4da05a7a80c1afd18b8f0990" ON "admin"."account" ("joystream_account") `) | ||
await db.query(`ALTER TABLE "membership" RENAME COLUMN "controller_account_id" TO "controller_account"`) | ||
await db.query(`DROP TABLE "blockchain_account"`) | ||
await db.query(`DROP TABLE "admin"."email_confirmation_token"`) | ||
await db.query(`ALTER TABLE "admin"."account" ADD "is_email_confirmed" boolean NOT NULL`) | ||
await db.query(`ALTER TABLE "admin"."account" ADD CONSTRAINT "Account_membership" UNIQUE ("membership_id")`) | ||
await db.query(`ALTER TABLE "admin"."account" ADD "membership_id" character varying NOT NULL`) | ||
await db.query(`ALTER TABLE "admin"."account" ADD CONSTRAINT "Account_joystreamAccount" UNIQUE ("joystream_account")`) | ||
await db.query(`ALTER TABLE "admin"."account" ADD "joystream_account" text NOT NULL`) | ||
await db.query(`ALTER TABLE "admin"."account" ADD "referrer_channel_id" text`) | ||
await db.query(`ALTER TABLE "admin"."account" DROP COLUMN "joystream_account_id"`) | ||
await db.query(`ALTER TABLE "admin"."account" DROP CONSTRAINT "UQ_90debbc4217372d2464201c576a"`) | ||
await db.query(`ALTER TABLE "membership" ADD "controller_account_id" text NOT NULL`) | ||
await db.query(`ALTER TABLE "membership" DROP COLUMN "controller_account_id"`) | ||
await db.query(`DROP INDEX "public"."IDX_58492b909a36e6a3e4dabd4674"`) | ||
await db.query(`DROP INDEX "admin"."IDX_90debbc4217372d2464201c576"`) | ||
await db.query(`ALTER TABLE "membership" DROP CONSTRAINT "FK_58492b909a36e6a3e4dabd46743"`) | ||
await db.query(`ALTER TABLE "admin"."account" DROP CONSTRAINT "FK_90debbc4217372d2464201c576a"`) | ||
} | ||
} |
4 changes: 2 additions & 2 deletions
4
db/migrations/1721141313757-Views.js → db/migrations/1722676430521-Views.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "orion", | ||
"version": "4.0.6", | ||
"version": "5.0.0", | ||
"engines": { | ||
"node": ">=16" | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we support multiple memberships within Atlas? Seems, like an overkill. Besides that it is possible from runtime perspective, it will only complicate the membership dropdown (we already had some feedback that it is complicated @dmtrjsg)