Skip to content

Commit 8e8c627

Browse files
authored
loginViaUsernamePassword -> loginViaEmailPassword (#17)
1 parent 4d5f6fd commit 8e8c627

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/modules/auth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ export function createAuthModule(
123123
* @param turnstileToken - Optional Turnstile captcha token
124124
* @returns Login response with access_token and user
125125
*/
126-
async loginViaUsernamePassword(
126+
async loginViaEmailPassword(
127127
email: string,
128128
password: string,
129129
turnstileToken?: string

tests/unit/auth.test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ describe('Auth Module', () => {
400400
});
401401
});
402402

403-
describe('loginViaUsernamePassword()', () => {
403+
describe('loginViaEmailPassword()', () => {
404404
test('should login successfully with email and password', async () => {
405405
const loginData = {
406406
email: 'test@example.com',
@@ -421,7 +421,7 @@ describe('Auth Module', () => {
421421
.reply(200, mockResponse);
422422

423423
// Call the API
424-
const result = await base44.auth.loginViaUsernamePassword(
424+
const result = await base44.auth.loginViaEmailPassword(
425425
loginData.email,
426426
loginData.password
427427
);
@@ -462,7 +462,7 @@ describe('Auth Module', () => {
462462
.reply(200, mockResponse);
463463

464464
// Call the API
465-
const result = await base44.auth.loginViaUsernamePassword(
465+
const result = await base44.auth.loginViaEmailPassword(
466466
loginData.email,
467467
loginData.password,
468468
loginData.turnstile_token
@@ -495,7 +495,7 @@ describe('Auth Module', () => {
495495

496496
// Call the API and expect an error
497497
await expect(
498-
base44.auth.loginViaUsernamePassword(loginData.email, loginData.password)
498+
base44.auth.loginViaEmailPassword(loginData.email, loginData.password)
499499
).rejects.toThrow();
500500

501501
// Verify all mocks were called
@@ -514,7 +514,7 @@ describe('Auth Module', () => {
514514

515515
// Call the API and expect an error
516516
await expect(
517-
base44.auth.loginViaUsernamePassword(loginData.email, loginData.password)
517+
base44.auth.loginViaEmailPassword(loginData.email, loginData.password)
518518
).rejects.toThrow();
519519

520520
// Verify all mocks were called

0 commit comments

Comments
 (0)