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

RPC OAuth support and Candymachine only UI #944

Closed
wants to merge 13 commits into from

Conversation

jkbpvsc
Copy link

@jkbpvsc jkbpvsc commented Nov 11, 2021

This PR has a POC/Hackathon version of a PKCE OAuth client that can be used to authenticate requests to a Solana RPC nodes (https://github.com/rpcpool/rpc-oauth-client). The client logic is stripped out of the https://github.com/auth0/auth0-spa-js project.

Additionally, it has UI and logic for minting NFTs directly from a Candy machine program taken from the Exiled Ape project (https://github.com/exiled-apes/candy-machine-mint).
This UI is present only when a REACT_APP_CANDY_MACHINE_ID is provided and REACT_APP_FAIR_LAUNCH_ID isn't.

FD: This was hacked together in a few days, the oauth/authentication logic needs to be packaged nicely, so other projects can use it (ideally by being part of the https://github.com/solana-labs/solana-web3.js project).
And the Candymachine UI needs to be polished and better integrated into the fair launch codebase. This is an internim solution and should be replaced once the oauth client in web3js is supported

@vercel
Copy link

vercel bot commented Nov 11, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

pinkskull – ./js

🔍 Inspect: https://vercel.com/metaplex/pinkskull/2ewmbPp1Nr6dTKZMAUAAxYm83VpQ
✅ Preview: https://pinkskull-git-fork-jkbpvsc-master-metaplex.vercel.app

litjesus – ./js/packages/fair-launch

🔍 Inspect: https://vercel.com/metaplex/litjesus/GqRJPryQuXX7PCPYc6pKHJwVWFyP
✅ Preview: Failed

[Deployment for 594408e failed]

rnftz – ./js/packages/fair-launch

🔍 Inspect: https://vercel.com/metaplex/rnftz/8tL4yxNCPRCBN91gfbYbSqjrhhNN
✅ Preview: Failed

[Deployment for 594408e failed]

pplpleasr – ./js/packages/fair-launch

🔍 Inspect: https://vercel.com/metaplex/pplpleasr/EUbxvBUncs5Bufkat2uHd8DHLCcB
✅ Preview: Failed

[Deployment for 594408e failed]

ono-store – ./js

🔍 Inspect: https://vercel.com/metaplex/ono-store/67nVh5mJTBh4ECikKWm6LHkSGvp9
✅ Preview: Failed

[Deployment for 594408e failed]

nephrops – ./js

🔍 Inspect: https://vercel.com/metaplex/nephrops/HumrCqdmoUjRt8UX2hvQ6rn1Lngm
✅ Preview: https://nephrops-git-fork-jkbpvsc-master-metaplex.vercel.app

fair-launch – ./js/packages/fair-launch

🔍 Inspect: https://vercel.com/metaplex/fair-launch/8YCCuwUnYz33JtCb9BeT89tz9A9z
✅ Preview: Failed

[Deployment for 3d7629c failed]

helium – ./js

🔍 Inspect: https://vercel.com/metaplex/helium/G9L3DiLaohAntUAScc8nhn7uQwSk
✅ Preview: Failed

[Deployment for 594408e failed]

squidstuff – ./js

🔍 Inspect: https://vercel.com/metaplex/squidstuff/8zyMkiDsESZGEncXy4YijVCf5cFw
✅ Preview: https://squidstuff-git-fork-jkbpvsc-master-metaplex.vercel.app

@vercel
Copy link

vercel bot commented Nov 11, 2021

@jkbpvsc is attempting to deploy a commit to the Metaplex Team on Vercel.

A member of the Team first needs to authorize it.

@jkbpvsc
Copy link
Author

jkbpvsc commented Nov 15, 2021

@bhgames I was thinking of moving the oauth logic to the web3.js library, so authentication can be handled on the same level as the http client.

@bhgames
Copy link
Contributor

bhgames commented Nov 24, 2021

lets get some movement on this so we can gfet it in

@jkbpvsc
Copy link
Author

jkbpvsc commented Nov 24, 2021

We are working on integrating the oauth client into web3js, which will be used here.

If you want to speed this up we can clean up this code as an intermediary solution and merge it.

But ultimately the web3js oauth client will provide better ux and better control with oauth.

@jkbpvsc
Copy link
Author

jkbpvsc commented Nov 28, 2021

@bhgames I've cleaned up the code:

  • oauth client won't loop on error
  • use existing mintOneToken function
  • use existing awaitTransactionSignatureConfirmation function

@jkbpvsc
Copy link
Author

jkbpvsc commented Dec 10, 2021

Can I help unblock anything here?

@bhgames
Copy link
Contributor

bhgames commented Dec 10, 2021 via email

@jkbpvsc
Copy link
Author

jkbpvsc commented Dec 12, 2021

Opened a new PR #1193
Closing this one.

@jkbpvsc jkbpvsc closed this Dec 12, 2021
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