Improve OpenID login flow security

This commit is contained in:
Jesse Wierzbinski 2023-12-06 13:34:56 -10:00
parent d47a11cfc2
commit 22ebf72b6b
No known key found for this signature in database
5 changed files with 77 additions and 28 deletions

View file

@ -0,0 +1,12 @@
/*
Warnings:
- Added the required column `issuerId` to the `OpenIdLoginFlow` table without a default value. This is not possible if the table is not empty.
*/
-- AlterTable
ALTER TABLE "OpenIdLoginFlow" ADD COLUMN "applicationId" UUID,
ADD COLUMN "issuerId" TEXT NOT NULL;
-- AddForeignKey
ALTER TABLE "OpenIdLoginFlow" ADD CONSTRAINT "OpenIdLoginFlow_applicationId_fkey" FOREIGN KEY ("applicationId") REFERENCES "Application"("id") ON DELETE CASCADE ON UPDATE CASCADE;

View file

@ -0,0 +1,8 @@
/*
Warnings:
- A unique constraint covering the columns `[client_id]` on the table `Application` will be added. If there are existing duplicate values, this will fail.
*/
-- CreateIndex
CREATE UNIQUE INDEX "Application_client_id_key" ON "Application"("client_id");