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

Protect create2 verification with an auth0 authentication #1090

Merged
merged 18 commits into from
Jul 24, 2023

Conversation

marcocastignoli
Copy link
Member

@marcocastignoli marcocastignoli commented Jul 5, 2023

  • using auth0 I created an Application API + Frontend Application + user database.
  • in order to access the /verify/create2 API, a jwt token is necessary. and the user calling the api must have the "verify:create2" permission (set on the Application API) (functionality commented for now)
  • in order to send request programmatically the developer needs to create an account and then "login" via cli get the token and send the token
  • in the ui the user needs to login, and then a new token is asked every request
  • canceling tokens mean to:
    • delete the user
    • set the jwt token expiracy data very short (like 30 seconds)

TODO

  • implement tests
  • Add instructions in the docs

View in Huly HI-541

@marcocastignoli marcocastignoli marked this pull request as ready for review July 5, 2023 11:45
@marcocastignoli marcocastignoli requested a review from kuzdogan July 5, 2023 13:00
@kuzdogan
Copy link
Member

kuzdogan commented Jul 6, 2023

I came across a bug. It is not related to this PR but we can fix it here.

Steps to reproduce:

  1. Add a contract and click "Verify create2 contract"
  2. Input a valid address
  3. Input an invalid salt such as -

The UI will throw

@kuzdogan
Copy link
Member

kuzdogan commented Jul 6, 2023

Also having an error after clicking "Verify"
image

image

Can you successfully verify or am I missing a config?

Copy link
Member

@kuzdogan kuzdogan left a comment

Choose a reason for hiding this comment

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

Just a small thing + the bugs I've encountered.

src/server/controllers/verification/verification.common.ts Outdated Show resolved Hide resolved
@marcocastignoli
Copy link
Member Author

Also having an error after clicking "Verify"

I've never seen that error

I came across a bug. It is not related to this PR but we can fix it here.

I'll check this

@marcocastignoli marcocastignoli merged commit c1705ea into staging Jul 24, 2023
@kuzdogan kuzdogan mentioned this pull request Jul 24, 2023
8 tasks
@kuzdogan kuzdogan deleted the auth0-experiment branch December 19, 2023 18:23
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