Skip to content

Commit

Permalink
Handling of oauth response cont.
Browse files Browse the repository at this point in the history
  • Loading branch information
rosarp-gobazzinga committed Jan 23, 2024
1 parent df4501a commit ada9a2e
Show file tree
Hide file tree
Showing 6 changed files with 273 additions and 32 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/deploy-to-production-on-merge-to-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,10 @@ jobs:
- name: Deploy a docker container to Fly.io
env:
FLY_API_TOKEN: ${{ secrets.HOT_OR_NOT_AUTH_FLY_IO_GITHUB_ACTION }}
run: flyctl deploy --remote-only
AUTH_SIGN_KEY: ${{ secrets.AUTH_SESSION_COOKIE_SIGNING_SECRET_KEY }}
CLOUDFLARE_ACCOUNT_IDENTIFIER: ${{ secrets.CLOUDFLARE_WORKERS_KV_ACCOUNT_ID }}
CLOUDFLARE_NAMESPACE_IDENTIFIER: ${{ secrets.CLOUDFLARE_WORKERS_KV_NAMESPACE_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_WORKERS_KV_API_SECRET }}
GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_SIGNING_OAUTH_CLIENT_CREDENTIAL_CLIENT_ID }}
GOOGLE_CLIENT_SECRET: ${{ secrets.GOOGLE_SIGNING_OAUTH_CLIENT_CREDENTIAL_CLIENT_SECRET }}
run: flyctl deploy --remote-only
2 changes: 1 addition & 1 deletion AuthConfig.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# auth_ic_url = "https://ic0.app"
auth_ic_url = "http://0.0.0.0:4943"
auth_ic_url = "http://127.0.0.1:4943"
auth_sign_key = ""

# cloudflare_configs
Expand Down
99 changes: 99 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ version = "0.1.0"
edition = "2021"

[lib]
crate-type = ["cdylib", "rlib"]
crate-type = ["cdylib", "rlib", "staticlib"]

[dependencies]
axum = { version = "0.7", optional = true, features = ["http2", "macros"] }
axum-extra = { version = "0.9", features = ["cookie", "cookie-signed"] }
axum-extra = { version = "0.9", features = ["cookie", "cookie-signed", "cookie-private"] }
bip32 = { version = "0.5", optional = true }
cfg-if = "1.0"
chrono = { version = "0.4", optional = true }
Expand All @@ -26,8 +26,10 @@ leptos_router = { version = "0.6.0-beta", features = ["nightly"], git = "https:/
log = "0.4"
oauth2 = "4.4"
rand = { version = "0.8", optional = true }
reqwest = { version = "0.11", optional = true, default-features = false, features = ["json", "rustls"] }
sec1 = { version = "0.7", optional = true }
serde = { version = "1.0", features = ["derive"] }
serde_json = { version = "1.0", optional = true }
thiserror = "1.0"
tiny-bip39 = { version = "1.0", optional = true }
tokio = { version = "1.35", optional = true, features = ["rt-multi-thread", "macros"] }
Expand All @@ -49,7 +51,9 @@ ssr = [
"dep:k256",
"dep:leptos_axum",
"dep:rand",
"dep:reqwest",
"dep:sec1",
"dep:serde_json",
"dep:tiny-bip39",
"dep:tokio",
"dep:tower",
Expand Down
2 changes: 1 addition & 1 deletion src/init.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use cfg_if::cfg_if;
use serde::Deserialize;

cfg_if! { if #[cfg(feature = "ssr")] {
extern crate tracing;
Expand All @@ -7,7 +8,6 @@ use figment::{
providers::{Env, Format, Toml},
Figment,
};
use serde::Deserialize;
}}

#[cfg(feature = "ssr")]
Expand Down
Loading

0 comments on commit ada9a2e

Please sign in to comment.