Implement register and login with Telegram
Add the concept of authentication methods that authenticate an account where using the telegram login widget is one such method. If a login is done with an authentication method that's not associated with any account the session ends up with the data from the authentication method in order to allow registering a new account with the authentication method. This has to be stored on the session as otherwise it wouldn't be possible to implement authentication methods such as OAuth2 that takes the user to a third-party site and then redirects the browser back.
This commit is contained in:
parent
2d6bcebc5a
commit
aaa2faffb1
14 changed files with 357 additions and 8 deletions
15
docs/admin/authentication.md
Normal file
15
docs/admin/authentication.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
<!--
|
||||
SPDX-FileCopyrightText: © 2025 Hornwitser <code@hornwitser.no>
|
||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
-->
|
||||
# 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.
|
Loading…
Add table
Add a link
Reference in a new issue