diff --git a/components/Header.vue b/components/Header.vue
index 0d9e95d..fd79684 100644
--- a/components/Header.vue
+++ b/components/Header.vue
@@ -33,6 +33,7 @@
Log In
+ Register
diff --git a/components/LogInTelegram.vue b/components/LogInTelegram.vue
new file mode 100644
index 0000000..d56fa98
--- /dev/null
+++ b/components/LogInTelegram.vue
@@ -0,0 +1,61 @@
+
+
+
+
+
+
+
+
diff --git a/docs/admin/authentication.md b/docs/admin/authentication.md
new file mode 100644
index 0000000..a1fbc3e
--- /dev/null
+++ b/docs/admin/authentication.md
@@ -0,0 +1,15 @@
+
+# Authentication
+
+It's possible to configure authentication using a third party Authentication Provider (referred to as AP). Currently only Telegram is supported as an AP.
+
+## Telegram
+
+In order to use Telegram as an AP you need to be hosting Owltide under a domain name over https, using http will not work.
+
+You will also need a bot which can be created by messaging [@BotFather](https://t.me/BotFather), with the domain of the bot set using the `/setdomain` command to the domain Owltide is hosted under.
+
+Once you have the pre-requisites you need to configure `NUXT_TELEGRAM_BOT_TOKEN_FILE` to a path to a file containing the token of the bot with no spaces or new-lines. `NUXT_PUBLIC_TELEGRAM_BOT_USERNAME` to the username of the bot. And finally `NUXT_AUTH_TELEGRAM_ENABLED` to `true` to enable authentication via Telegram.
diff --git a/docs/admin/config.md b/docs/admin/config.md
index e273f7d..b95e08d 100644
--- a/docs/admin/config.md
+++ b/docs/admin/config.md
@@ -19,3 +19,21 @@ Time in seconds before a session need to be rotated over into a new session. Whe
Time in seconds before a session is deleted from the client and server, resulting in the user having to authenticate again if the session wasn't rotated over into a new session before this timeout.
This should be several times greater that `NUXT_SESSION_ROTATES_TIMEOUT`.
+
+### NUXT_TELEGRAM_BOT_TOKEN_FILE
+
+Path to a file containing the token for the Telegram bot used for authenticating users via Telegram.
+
+Does nothing if `NUXT_AUTH_TELEGRAM_ENABLED` is not enabled.
+
+### NUXT_PUBLIC_TELEGRAM_BOT_USERNAME
+
+Username of the Telegram bot used for authenticating users via Telegram.
+
+Does nothing if `NUXT_AUTH_TELEGRAM_ENABLED` is not enabled.
+
+### NUXT_AUTH_TELEGRAM_ENABLED
+
+Boolean indicating if authentication via Telegram is enabled or not. Requires `NUXT_PUBLIC_TELEGRAM_BOT_USERNAME` and `NUXT_TELEGRAM_BOT_TOKEN_FILE` to be set in order to work.
+
+Defaults to `false`.
diff --git a/nuxt.config.ts b/nuxt.config.ts
index 6ff336a..b970358 100644
--- a/nuxt.config.ts
+++ b/nuxt.config.ts
@@ -27,9 +27,12 @@ export default defineNuxtConfig({
sessionDiscardTimeout: 14 * oneDaySeconds,
vapidSubject: "",
vapidPrivateKeyFile: "",
+ telegramBotTokenFile: "",
public: {
defaultTimezone: "Europe/Oslo",
defaultLocale: "en-GB",
+ authTelegramEnabled: false,
+ telegramBotUsername: "",
vapidPublicKey: "",
}
},
diff --git a/pages/login.vue b/pages/login.vue
index cdb04b8..01b233f 100644
--- a/pages/login.vue
+++ b/pages/login.vue
@@ -9,6 +9,7 @@
+