feat: add social login to avoid draining#57
Conversation
c097adf to
38ecaa3
Compare
| @@ -0,0 +1,212 @@ | |||
| { | |||
There was a problem hiding this comment.
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.
oh yeah, of course... I guess I just forgot to delete this, thanks
xgreenx
left a comment
There was a problem hiding this comment.
It would be nice if @luizstacio reviewed it=)
| 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.
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
| 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.
Nope, just forget to rollback also, sorry hahah
| 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.
Do we need to create it each time?
There was a problem hiding this comment.
what's the other way we could avoid creating it on each time?
| 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.
Do we need to verify JWT toke here?
There was a problem hiding this comment.
yup, to prevent people from entering directly in the home route without doing auth
Co-authored-by: Brandon Kite <brandonkite92@gmail.com>
…FuelLabs/faucet into pn/feat/auth0
| @@ -0,0 +1,212 @@ | |||
| { | |||
There was a problem hiding this comment.
We don't need to specify the chain config=)
| @@ -0,0 +1,20 @@ | |||
| # Proof of work | |||
There was a problem hiding this comment.
Why do we want to mix PoW with KYC PR? We have a separate PR for that #48
No description provided.