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(identity-provider): Identity Provider v1 #132

Merged
merged 121 commits into from Feb 17, 2021
Merged

Conversation

gobengo
Copy link
Contributor

@gobengo gobengo commented Jan 4, 2021

This Draft PR reflects the Epic branch to deliver the smallest first version to prod of the project formerly known as #mercury-request-authentication.

This supercedes aw/feat/finish-flow branch.

Reviewers should pay attention to:

hansl and others added 30 commits November 23, 2020 08:20
throws errors when either parameter are missing, we can handle that later
also check to make sure that url encoding is happening and parseable
* feat(idp): add token to redirect URL

adds main execution function

I wanted to put the logic for key management behind the DOM-related code, so I added index.ts that
is run when the page is loaded, and handles errors and actually doing the logic.

* fix: test descriptions
…68)

* refactor(idp): add react & react-router to make routing/views easier

add webpack-dev-server for ease of development

* for some reason need to add typings for react to "deps"

* remove commented code
Allows you to go through the flow of registering, but doesn't actually do anything on those pages.
* feat(idp): implements generation of bip39 mnemonic

Pulls in methods/classes from auth and uses to generate on each click

* show errors when importing or generating and mnemonic is invalid

* simplify mnemonic submission element, sacrifice some DRYness

* fix package.json

* prevent default

* no double confirm

* refactor snackbar errors

* fix eslint/prettier conflict
simplify mnemonic submission element, sacrifice some DRYness
show errors when importing or generating and mnemonic is invalid
refactor snackbar errors
* webpack BundleAnalyzerPlugin has analyzerPort: 'auto' so multiple can run together

* stub /relying-party-demo route

* Add authenticationButton to RelyingPartyDemo

* add src/protocol for shared 'AuthenticationRequest'/oauth2 types, and use it in RPAuthenticationButton
* refactor: move key generation to own subdir

* remove logs

* bengo notes
* improvement(idp): adds flow steps 1-7, ending in displaying authentication response

This makes `Authorization.tsx` a nightmare, but it does everything for right now, and we can split
it into smaller chunks now that we have it in one biggie. We do everything except loggin/storing,
and I think there's still opportunity to clean this up (will try to do this either this weekend or
early next week)

* minor fixes

* reduce steps to only handle user interactions

* remove unnecessary change

* test(idp): fix tests for parsing query parameters

* refactor(idp): refactor authorization into subdir

wanted to make things more better like ben
* add script to deploy identity-provider to identiy-provider.sdk-test.dfinity.network/deploy

* Add NotFound route for 404s (instead of showing homepage)

* Add deploy instructions to identity-provider README

* Add 'exact' prop to RelyingPartyDemo route, fixing issue where /relying-party-demo/foo would not show NotFound route

* move webpack output.publicPath=/ to webpack.config.js, not just webpack.config.dev.js

* Clarify in identity-provider README that deploying deps on building
…emo (#204)

* rm use of 'private class fields' syntax. In general, will check to ensure language features are stage 4+ going forward

* re-enable monorepo lint script to be bin/lint so bootsrap et al are linted

* Revert "re-enable monorepo lint script to be bin/lint so bootsrap et al are linted"

This reverts commit f359abc.
hansl added a commit that referenced this pull request Feb 16, 2021
This includes a change to request_id from the identity-provider PR
(#132) that I thought was related to something else, but is essential
here with the new lerna packages.

This moves the CI to using lerna entirely, and prevents running
npm install (instead telling the user to run npx lerna bootstrap).
@gobengo
Copy link
Contributor Author

gobengo commented Feb 17, 2021

One way of fixing the fact that this has conflicts with 'next' that must be resolved: #216

Here is a draft PR which is this PR (#132) plus that one (#216) against 'next', to verify it wuold make this green. #218

Benjamin Goering and others added 2 commits February 17, 2021 10:40
* feat: add support for bigint in leb128 (#200)

For now we just re-parse it in BigNumber.

* chore: add more files to gitignore (#203)

This is a split from #132.

* chore: remove scripts and move closer to lerna (#202)

This includes a change to request_id from the identity-provider PR
(#132) that I thought was related to something else, but is essential
here with the new lerna packages.

This moves the CI to using lerna entirely, and prevents running
npm install (instead telling the user to run npx lerna bootstrap).

* fix auth-demo missing dep

* use the right versions of packages

* fix tests for apps

* fix linting

* .

* rm subpackage package-lock.json

* regenerate /package-lock.json without subpackage package-lock.json

* rm package-lock.json

* try explicitly opting-in packages to lerna

* add hoist,ci to lerna.json

* gh nodejs-ci runs npm install

* fix npm install at monorepo now that subpackage ci scripts dont try to build

* package.json devDeps on packages/agent-js-devtools to provide typescript dep

* see if lerna installs devtools as dep not devDep

* Add typescript as monorepo devDep

* agent,bootstrap lint scripts dont call tslint (which isnt installed on gh actions)

* monorepo doesnt do its own lint, it just does lerna run lint

* @dfinity/agent package.json includes types key

* use lockfileVersion 1 since our github action for node 14 doesnt always know how to deal with lockfileVersion 2

* try with 'lerna bootstrap', ci=false, meaning each subpackage gets its own package-lock.json

* only use one version of typescript-eslint/eslint-plugin, not two

* hoist eslint and use one version

* hoist typescript

* hoist eslint-plugin-jsdoc

* hoist @typescript-eslint/parser

* disable new request_id sender_delegation test (will make it pass once ci works)

* rm file dependencies from /package.json (#217)

Co-authored-by: Hans <hans@larsen.online>
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

I have read every line and approve this PR.

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

Successfully merging this pull request may close these issues.

None yet

3 participants