-
Notifications
You must be signed in to change notification settings - Fork 20
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
Conversation
c097adf
to
38ecaa3
Compare
chain_info.json
Outdated
@@ -0,0 +1,212 @@ | |||
{ |
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.
Why do we need config here? It seems is not used, plus it can be fetched from the node directly
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.
oh yeah, of course... I guess I just forgot to delete this, thanks
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.
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 = |
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.
Do we need to change it?
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.
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; |
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.
Do we need to change it?
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.
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; |
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.
Do we need to create it each time?
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.
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(), |
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.
Do we need to verify JWT toke here?
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.
yup, to prevent people from entering directly in the home route without doing auth
Co-authored-by: Brandon Kite <[email protected]>
…FuelLabs/faucet into pn/feat/auth0
@@ -0,0 +1,212 @@ | |||
{ |
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.
We don't need to specify the chain config=)
@@ -0,0 +1,20 @@ | |||
# Proof of work |
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.
Why do we want to mix PoW with KYC PR? We have a separate PR for that #48
No description provided.