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: add social login to avoid draining #57

Closed
wants to merge 44 commits into from
Closed

Conversation

pedronauck
Copy link
Contributor

No description provided.

@pedronauck pedronauck changed the title feat: add auth0 to avoid draining feat: add social login to avoid draining Mar 5, 2024
@pedronauck pedronauck marked this pull request as ready for review March 5, 2024 21:22
@pedronauck pedronauck requested a review from xgreenx March 5, 2024 21:34
README.md Outdated Show resolved Hide resolved
chain_info.json Outdated
@@ -0,0 +1,212 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need config here? It seems is not used, plus it can be fetched from the node directly

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh yeah, of course... I guess I just forgot to delete this, thanks

Copy link
Contributor

@xgreenx xgreenx left a comment

Choose a reason for hiding this comment

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

It would be nice if @luizstacio reviewed it=)

@@ -5,9 +5,11 @@ pub const HUMAN_LOGGING: &str = "HUMAN_LOGGING";
pub const CAPTCHA_KEY: &str = "CAPTCHA_KEY";
pub const CAPTCHA_SECRET: &str = "CAPTCHA_SECRET";
pub const WALLET_SECRET_KEY: &str = "WALLET_SECRET_KEY";
pub const CLERK_PUB_KEY: &str = "CLERK_PUB_KEY";
pub const CLERK_SECRET_KEY: &str = "CLERK_SECRET_KEY";
pub const PUBLIC_FUEL_NODE_URL: &str = "PUBLIC_FUEL_NODE_URL";
pub const WALLET_SECRET_DEV_KEY: &str =
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to change it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just followed the default configuration, this is the way we are configuring the string value of the key when getting it inside the std::env

src/constants.rs Outdated
@@ -16,7 +18,7 @@ pub const DEFAULT_DISPENSE_INTERVAL: u64 = 24 * 60 * 60;
pub const DEFAULT_FAUCET_DISPENSE_AMOUNT: u64 = 10_000_000;
pub const FAUCET_ASSET_ID: AssetId = AssetId::new([0; 32]);
pub const SERVICE_PORT: &str = "PORT";
pub const DEFAULT_PORT: u16 = 3000;
pub const DEFAULT_PORT: u16 = 3001;
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to change it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nope, just forget to rollback also, sorry hahah

src/routes.rs Outdated
let clerk_key = Some(clerk_secret_key.expose_secret().clone());
let clerk_config = ClerkConfiguration::new(None, None, clerk_key, None);
let client = Clerk::new(clerk_config);
let res = sessions_api::Session::get_session(&client, data.value.as_str()).await;
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to create it each time?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

what's the other way we could avoid creating it on each time?

src/routes.rs Outdated
let jwt_token: Option<String> = session.get("JWT_TOKEN").await.unwrap();

match jwt_token {
Some(_) => Html(render_main(public_node_url, captcha_key, clerk_pub_key)).into_response(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to verify JWT toke here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yup, to prevent people from entering directly in the home route without doing auth

@@ -0,0 +1,212 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

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

We don't need to specify the chain config=)

@@ -0,0 +1,20 @@
# Proof of work
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we want to mix PoW with KYC PR? We have a separate PR for that #48

@pedronauck pedronauck closed this Mar 13, 2024
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.

4 participants