๐Ÿ” Yandex ID OAuth2 Authentication for Discourse

AI-generated summary

The plugin discourse-yandex-oauth enables OAuth2 authentication for Discourse using Yandex ID, allowing users to log in with their Yandex accounts. It supports features like one-click login, automatic account creation, email verification, avatar import, and account linking. The plugin includes error handling, logging, and multilingual support (English, Russian). Installation requires registering an application on Yandex OAuth, configuring the callback URL, and adding the plugin to Discourse. kaktak confirms the plugin works, while Ivan_Rapekas asks about bypassing Yandex account verification, which kaktak notes depends on Yandexโ€™s policies.

:information_source: Summary This plugin enables OAuth2 login via Yandex ID for your Discourse forum, allowing users to authenticate seamlessly using their Yandex accounts.
:hammer_and_wrench: Repository Link GitHub - kaktaknet/discourse-yandex-oauth: ๐Ÿ” Yandex ID Authentication for Discourse. OAuth2 authentication plugin for Discourse using Yandex ID ยท GitHub
:open_book: Install Guide How to install plugins in Discourse

Features

  • Secure OAuth 2.0 authentication flow with Yandex ID
  • One-click user login and automatic account creation
  • Email verification via Yandex
  • Avatar import from Yandex profile
  • Account linking by email
  • Username sanitization and validation
  • Comprehensive error handling and detailed logging
  • Multilingual support (English, Russian)
  • Easy integration with simple setup and clear documentation

Configuration

  1. Register your application on Yandex OAuth

    • Visit Yandex OAuth, create a new application.
    • Add your Discourse siteโ€™s callback URL:
      https://your-discourse-domain.com/auth/yandex/callback
      
    • Enable the following permissions:
      • login:email
      • login:info
      • login:avatar
  2. Add the plugin to your container

  3. Rebuild your Discourse app

cd /var/discourse
./launcher rebuild app
  1. Configure settings in the Discourse Admin panel
  • Navigate to: Admin > Settings > Login > Yandex
  • Fill in the required fields using the Client ID and Secret provided by Yandex OAuth.

Settings

Name Description
yandex_enabled Enable or disable Yandex authentication
yandex_client_id OAuth Client ID from your Yandex App
yandex_client_secret OAuth Client Secret from your Yandex App
yandex_email_verified Trust email verification from Yandex
2 Likes

Hi, plugin works, thank you!

A questionโ€ฆ Can I not verify my Yandex account? or could the login button for forum users suddenly break down because of this in the future?

1 Like

This is a question for Yandex, to which I donโ€™t have a definite answer, but usually, if youโ€™ve managed to configure the plugin, it will continue to work. Yandex does not disable services that have already been configured.

1 Like