Skip to content

feat: add social login to avoid draining#57

Closed
pedronauck wants to merge 44 commits intomasterfrom
pn/feat/auth0
Closed

feat: add social login to avoid draining#57
pedronauck wants to merge 44 commits intomasterfrom
pn/feat/auth0

Conversation

@pedronauck
Copy link
Copy Markdown
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 luizstacio March 5, 2024 21:34
@pedronauck pedronauck requested a review from xgreenx March 5, 2024 21:34
Comment thread README.md Outdated
Comment thread chain_info.json
@@ -0,0 +1,212 @@
{
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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=)

Comment thread src/constants.rs
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
Copy Markdown
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
Copy Markdown
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

Comment thread src/constants.rs Outdated
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
Copy Markdown
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
Copy Markdown
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

Comment thread 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
Copy Markdown
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
Copy Markdown
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?

Comment thread 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
Copy Markdown
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
Copy Markdown
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

Comment thread chain_config.json
@@ -0,0 +1,212 @@
{
Copy link
Copy Markdown
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=)

Comment thread docs/ARCHITECTURE.md
@@ -0,0 +1,20 @@
# Proof of work
Copy link
Copy Markdown
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