Add OTP login flow and multi-cafe role switching
Introduce an OTP input box on login/register, surface user roles and a cafe chooser, add a dashboard switch button in the POS screen, and register OTP validators explicitly to survive Docker layer caching. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -5,6 +5,7 @@ using Microsoft.AspNetCore.Authentication.JwtBearer;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
using Meezi.Admin.API.Hubs;
|
||||
using Meezi.Admin.API.Services;
|
||||
using Meezi.Admin.API.Models;
|
||||
using Meezi.Admin.API.Validators;
|
||||
using Meezi.Infrastructure;
|
||||
using Serilog;
|
||||
@@ -38,6 +39,10 @@ public static class AdminServiceCollectionExtensions
|
||||
services.AddSwaggerGen();
|
||||
services.AddSignalR();
|
||||
services.AddValidatorsFromAssemblyContaining<SendOtpRequestValidator>();
|
||||
// Explicit registrations as safety net (assembly scan can miss in some Docker layer caches)
|
||||
services.AddScoped<IValidator<SendOtpRequest>, SendOtpRequestValidator>();
|
||||
services.AddScoped<IValidator<VerifyOtpRequest>, VerifyOtpRequestValidator>();
|
||||
services.AddScoped<IValidator<RefreshTokenRequest>, RefreshTokenRequestValidator>();
|
||||
|
||||
var jwtKey = configuration["Jwt:Key"] ?? "meezi-dev-secret-key-min-32-chars!!";
|
||||
var jwtIssuer = configuration["Jwt:Issuer"] ?? "meezi";
|
||||
|
||||
Reference in New Issue
Block a user