mirror of
https://github.com/documenso/documenso.git
synced 2025-11-14 00:32:43 +10:00
feat: add organisation sso portal (#1946)
Allow organisations to manage an SSO OIDC compliant portal. This method is intended to streamline the onboarding process and paves the way to allow organisations to manage their members in a more strict way.
This commit is contained in:
@ -0,0 +1,25 @@
|
||||
import { ORGANISATION_ACCOUNT_LINK_VERIFICATION_TOKEN_IDENTIFIER } from '@documenso/lib/constants/organisations';
|
||||
import { prisma } from '@documenso/prisma';
|
||||
|
||||
import { procedure } from '../trpc';
|
||||
import {
|
||||
ZDeclineLinkOrganisationAccountRequestSchema,
|
||||
ZDeclineLinkOrganisationAccountResponseSchema,
|
||||
} from './decline-link-organisation-account.types';
|
||||
|
||||
/**
|
||||
* Unauthenicated procedure, do not copy paste.
|
||||
*/
|
||||
export const declineLinkOrganisationAccountRoute = procedure
|
||||
.input(ZDeclineLinkOrganisationAccountRequestSchema)
|
||||
.output(ZDeclineLinkOrganisationAccountResponseSchema)
|
||||
.mutation(async ({ input }) => {
|
||||
const { token } = input;
|
||||
|
||||
await prisma.verificationToken.delete({
|
||||
where: {
|
||||
token,
|
||||
identifier: ORGANISATION_ACCOUNT_LINK_VERIFICATION_TOKEN_IDENTIFIER,
|
||||
},
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user