AkdiraAccount

Add Login with Akdira Account to your app

Akdira Account is a standard OpenID Connect provider backed by the Akdira directory (OpenLDAP). Any app or library that supports “Sign in with Microsoft / Google”-style OIDC works with it — people sign in once with their @akdira.id account.

1Register your app

An Akdira admin registers the app under Apps (redirect URI, platform). You receive a Client ID and — for server-side web apps — a Client secret. Single-page and mobile apps are registered as public clients and must use PKCE.

2Add the button

Copy-paste ready HTML (no external CSS needed). Point href at the route in your app that starts the sign-in.

HTML · light
<a href="/auth/akdira" style="display:inline-flex;align-items:center;gap:12px;height:41px;padding:0 12px;background:#fff;color:#5e5e5e;border:1px solid #8c8c8c;border-radius:4px;font:600 15px 'Segoe UI',system-ui,-apple-system,sans-serif;text-decoration:none">
  <svg width="21" height="21" viewBox="0 0 32 32" aria-hidden="true"><defs><linearGradient id="akdira-btn-g" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#7c3aed"/><stop offset="1" stop-color="#06b6d4"/></linearGradient></defs><rect width="32" height="32" rx="8" fill="url(#akdira-btn-g)"/><path d="M16 6.5 8 25.5h4.2l1.6-4.2h4.4l1.6 4.2H24L16 6.5zM14.2 18.3 16 13.2l1.8 5.1z" fill="#fff" fill-rule="evenodd"/></svg>
  <span>Login with Akdira Account</span>
</a>
HTML · dark
<a href="/auth/akdira" style="display:inline-flex;align-items:center;gap:12px;height:41px;padding:0 12px;background:#2f2f2f;color:#fff;border:1px solid #2f2f2f;border-radius:4px;font:600 15px 'Segoe UI',system-ui,-apple-system,sans-serif;text-decoration:none">
  <svg width="21" height="21" viewBox="0 0 32 32" aria-hidden="true"><defs><linearGradient id="akdira-btn-g" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#7c3aed"/><stop offset="1" stop-color="#06b6d4"/></linearGradient></defs><rect width="32" height="32" rx="8" fill="url(#akdira-btn-g)"/><path d="M16 6.5 8 25.5h4.2l1.6-4.2h4.4l1.6 4.2H24L16 6.5zM14.2 18.3 16 13.2l1.8 5.1z" fill="#fff" fill-rule="evenodd"/></svg>
  <span>Login with Akdira Account</span>
</a>

Prefer an image? login-with-akdira-light.svg · login-with-akdira-dark.svg

3Configure your OpenID Connect library

Issuerhttps://account.akdira.id
Discoveryhttps://account.akdira.id/.well-known/openid-configuration
Authorizationhttps://account.akdira.id/oauth2/authorize
Tokenhttps://account.akdira.id/oauth2/token
UserInfohttps://account.akdira.id/oauth2/userinfo
JWKShttps://account.akdira.id/oauth2/jwks
Logout (end session)https://account.akdira.id/oauth2/logout
Revocationhttps://account.akdira.id/oauth2/revoke
FlowAuthorization Code (+ PKCE S256). Refresh tokens with the offline_access scope.
Client authenticationclient_secret_basic, client_secret_post or none (public + PKCE)
SigningRS256 (keys at the JWKS endpoint)

Node.js (openid-client)

JavaScript
// npm install openid-client express express-session
import * as oidc from 'openid-client';

const config = await oidc.discovery(
  new URL('https://account.akdira.id'),
  process.env.AKDIRA_CLIENT_ID,
  process.env.AKDIRA_CLIENT_SECRET,
);

// 1) "Login with Akdira Account" button → /auth/akdira
app.get('/auth/akdira', async (req, res) => {
  const verifier = oidc.randomPKCECodeVerifier();
  const state = oidc.randomState();
  req.session.akdira = { verifier, state };
  res.redirect(oidc.buildAuthorizationUrl(config, {
    redirect_uri: 'https://your-app.example.com/auth/akdira/callback',
    scope: 'openid profile email groups',
    code_challenge: await oidc.calculatePKCECodeChallenge(verifier),
    code_challenge_method: 'S256',
    state,
  }).href);
});

// 2) Callback: exchange the code, read the verified ID token claims
app.get('/auth/akdira/callback', async (req, res) => {
  const { verifier, state } = req.session.akdira;
  const tokens = await oidc.authorizationCodeGrant(config, new URL(req.originalUrl, 'https://your-app.example.com'), {
    pkceCodeVerifier: verifier,
    expectedState: state,
  });
  const user = tokens.claims(); // { sub, name, email, preferred_username, groups, ... }
  req.session.user = user;
  res.redirect('/');
});

Python (Authlib)

Python
# pip install authlib flask
from authlib.integrations.flask_client import OAuth

oauth = OAuth(app)
oauth.register(
    name="akdira",
    server_metadata_url="https://account.akdira.id/.well-known/openid-configuration",
    client_id=AKDIRA_CLIENT_ID,
    client_secret=AKDIRA_CLIENT_SECRET,
    client_kwargs={"scope": "openid profile email groups", "code_challenge_method": "S256"},
)

@app.route("/auth/akdira")
def login():
    return oauth.akdira.authorize_redirect(url_for("callback", _external=True))

@app.route("/auth/akdira/callback")
def callback():
    token = oauth.akdira.authorize_access_token()
    session["user"] = token["userinfo"]
    return redirect("/")

Odoo

Odoo's built-in OAuth Authentication only supports the legacy implicit flow. Use the OCA module auth_oidc with Auth Flow: Authorization Code Flow with PKCE, Authorization URL https://account.akdira.id/oauth2/authorize, Token URL https://account.akdira.id/oauth2/token, JWKS URL https://account.akdira.id/oauth2/jwks, scope openid profile email and token map sub:user_id.

Scopes & claims

ScopeThe user sees
openidSign you in with your Akdira Account
profileRead your basic profile (name, job title, department, photo)
emailRead your email address
phoneRead your phone number
groupsRead the groups you belong to
offline_accessKeep access to the data you gave it access to, even when you are not using it
ClaimScopeDescription
subopenidStable, unique account ID (never changes, even if the username does)
name / given_name / family_nameprofileDisplay name and name parts
preferred_usernameprofileUsername, e.g. akmal
upnprofileSign-in name, e.g. akmal@akdira.id
job_title / departmentprofileFrom the directory
pictureprofileProfile photo URL (when set)
email / email_verifiedemailDirectory email address (always verified)
phone_numberphoneMobile or work phone
groupsgroupsDirectory groups, e.g. ["admins","engineering"]

Claims are included in both the ID token and the UserInfo response. Disabled accounts cannot sign in and their tokens stop resolving at the UserInfo endpoint.