Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
AGENT_ADMIN_API_KEY=pydentity
AGENT_ADMIN_ENDPOINT=https://admin.dev.pydentity.net
NGROK_AUTHTOKEN=your-token-here
NGROK_AUTHTOKEN=your-token-here

PYDENTITY_WALLET_APP_LOGO=https://raw.githubusercontent.com/OpSecId/PyDentity-Wallet/refs/heads/main/assets/pydentity-logo.png
PYDENTITY_WALLET_APP_ICON=https://raw.githubusercontent.com/OpSecId/PyDentity-Wallet/refs/heads/main/assets/pydentity-icon.png
PYDENTITY_WALLET_APP_NAME="PyDentity Wallet"
6 changes: 4 additions & 2 deletions app/routes/auth/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,17 @@ def index():
session.clear()
session["endpoint"] = Config.APP_URL
session["development"] = Config.TESTING
if Config.ENV == 'development':
session["app_icon"] = Config.APP_ICON
session["app_logo"] = Config.APP_LOGO
if Config.ENV == "development":
# For development, we bypass the webauthn auth flow
session["client_id"] = str(uuid.uuid4())
wallet = await_(provision_wallet(session.get("client_id")))
session["token"], session["wallet_id"] = (
wallet.get("token"),
wallet.get("wallet_id"),
)
return redirect(url_for('main.index'))
return redirect(url_for("main.index"))
return render_template("pages/auth.jinja", title=Config.APP_NAME)


Expand Down
10 changes: 5 additions & 5 deletions app/templates/components/head.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@
<meta name="mobile-web-app-capable" content="yes">
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<link rel="icon" href="{{ url_for('static', filename='img/pydentity-icon.png') }}" type="image/x-icon">
<link rel="shortcut icon" href="{{ url_for('static', filename='img/pydentity-icon.png') }}" type="image/x-icon">
<link rel="icon" href="{{ session['app_icon'] }}" type="image/x-icon">
<link rel="shortcut icon" href="{{ session['app_icon'] }}" type="image/x-icon">
<meta name="description" content="">
<meta name="twitter:image:src" content="{{ url_for('static', filename='img/pydentity-logo.png') }}">
<meta name="twitter:image:src" content="{{ session['app_logo'] }}">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="">
<meta name="twitter:description" content="">
<meta property="og:image" content="{{ url_for('static', filename='img/pydentity-logo.png') }}">
<meta property="og:image" content="{{ session['app_logo'] }}">
<meta property="og:image:width" content="1280">
<meta property="og:image:height" content="640">
<meta property="og:site_name" content="PyDentity">
<meta property="og:type" content="object">
<meta property="og:title" content="">
<meta property="og:url" content="{{ url_for('static', filename='img/pydentity-logo.png') }}">
<meta property="og:url" content="{{ session['app_logo'] }}">
<meta property="og:description" content="">
<!-- CSS files -->
<link href="https://cdn.jsdelivr.net/npm/@tabler/core@1.1.1/dist/css/tabler.min.css" rel="stylesheet">
Expand Down
2 changes: 1 addition & 1 deletion app/templates/components/header.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="navbar-brand navbar-brand-autodark d-none-navbar-horizontal pe-0 pe-md-3">
<a href=".">
<img width="42" height="42"
src="{{ url_for('static', filename='img/pydentity-icon.png') }}">
src="{{ session['app_icon'] }}">
</a>
</div>
<div class="navbar-nav flex-row order-md-last">
Expand Down
2 changes: 1 addition & 1 deletion app/templates/pages/auth.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<div class="container container-tight py-4" onload="accessWallet()">
<div class="text-center mb-4">
<a href="." class="navbar-brand navbar-brand-autodark">
<img width="220px" src="{{ url_for('static', filename='img/pydentity-logo.png') }}">
<img width="220px" src="{{ session['app_logo'] }}">
</a>
</div>
<div id="loading-access" class="progress progress-sm" style="display: none;">
Expand Down
File renamed without changes
File renamed without changes
12 changes: 10 additions & 2 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,16 @@ class Config(object):
TESTING = True if ENV == "development" else False

DOMAIN = os.getenv("PYDENTITY_WALLET_DOMAIN", "localhost")
APP_URL = os.getenv("PYDENTITY_WALLET_APP_URL", "https://localhost:5000")
APP_NAME = "PyDentity Wallet"
APP_URL = os.getenv("PYDENTITY_WALLET_APP_URL", "http://localhost:5000")
APP_NAME = os.getenv("PYDENTITY_WALLET_APP_NAME", "PyDentity Wallet")
APP_ICON = os.getenv(
"PYDENTITY_WALLET_APP_ICON",
"https://raw.githubusercontent.com/openwallet-foundation-labs/PyDentity-Wallet/refs/heads/main/assets/pydentity-icon.png",
)
APP_LOGO = os.getenv(
"PYDENTITY_WALLET_APP_LOGO",
"https://raw.githubusercontent.com/openwallet-foundation-labs/PyDentity-Wallet/refs/heads/main/assets/pydentity-logo.png",
Comment on lines +21 to +26
Copy link

Choose a reason for hiding this comment

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

We could reference the assets served as static resources instead of an external resource, as default.

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 will look into this. perhaps a "branding" directory could be mounted which contains images and maybe css configurations in the future.

)

PROJECT_URL = "https://github.com/openwallet-foundation-labs/PyDentity-Wallet"

Expand Down