mirror of
https://github.com/outline/outline.git
synced 2026-01-06 02:59:54 -06:00
This PR contains the necessary work to make Outline an OAuth provider including: - OAuth app registration - OAuth app management - Private / public apps (Public in cloud only) - Full OAuth 2.0 spec compatible authentication flow - Granular scopes - User token management screen in settings - Associated API endpoints for programatic access
17 lines
574 B
TypeScript
17 lines
574 B
TypeScript
import { OAuthAuthentication } from "@server/models";
|
|
import { presentPublishedOAuthClient } from "./oauthClient";
|
|
|
|
export default function presentOAuthAuthentication(
|
|
oauthAuthentication: OAuthAuthentication
|
|
) {
|
|
return {
|
|
id: oauthAuthentication.id,
|
|
userId: oauthAuthentication.userId,
|
|
oauthClientId: oauthAuthentication.oauthClientId,
|
|
oauthClient: presentPublishedOAuthClient(oauthAuthentication.oauthClient),
|
|
scope: oauthAuthentication.scope,
|
|
lastActiveAt: oauthAuthentication.lastActiveAt,
|
|
createdAt: oauthAuthentication.createdAt,
|
|
};
|
|
}
|