feat: Add HNS Login to HNS Links

This commit is contained in:
2024-06-19 14:21:57 +10:00
parent e844936a00
commit de2ffd022a
2 changed files with 41 additions and 1 deletions

View File

@@ -11,6 +11,14 @@ def varo_login():
}
});'''
def hnslogin():
# Redirect to https://login.hns.au/auth?return={{scheme}}{{host}}/auth
return """
const { protocol, hostname, port } = window.location;
const rootUrl = `${protocol}//${hostname}${port ? `:${port}` : ''}/auth`;
window.location.href = `https://login.hns.au/auth?return=${encodeURIComponent(rootUrl)}`;
"""
def preview(data):
title = data['title']