Skip to content

Commit

Permalink
chore(ui): reformat via prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
iamKunalGupta committed Jan 8, 2024
1 parent d5c7eef commit 54d0498
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions ui/app/auth/options.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Provider } from 'next-auth/providers/index';
import CredentialsProvider from 'next-auth/providers/credentials';
import { Configuration } from '@/app/config/config';
import { AuthOptions } from 'next-auth';
import CredentialsProvider from 'next-auth/providers/credentials';
import { Provider } from 'next-auth/providers/index';

function getEnabledProviders(): Provider[] {
return [
Expand All @@ -11,15 +11,17 @@ function getEnabledProviders(): Provider[] {
password: { label: 'Password', type: 'password' },
},
async authorize(credentials, req) {
if (credentials == null || credentials.password != Configuration.authentication.PEERDB_PASSWORD) {
if (
credentials == null ||
credentials.password != Configuration.authentication.PEERDB_PASSWORD
) {
return null;
}
return { id: '1', name: 'Admin' };
},
}),
];
}

export const authOptions: AuthOptions = {
providers: getEnabledProviders(),
debug: false,
Expand Down

0 comments on commit 54d0498

Please sign in to comment.