Skip to content
This repository has been archived by the owner on Dec 18, 2024. It is now read-only.

Commit

Permalink
Cleanup & Deployment Fix (#474)
Browse files Browse the repository at this point in the history
* refactor: remove dead Feide logic

* build: add .nvmrc file

* test: remove feide references
  • Loading branch information
AdrianAndersen authored Oct 18, 2023
1 parent c820208 commit f0e1f14
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 123 deletions.
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v18
3 changes: 0 additions & 3 deletions src/application-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,6 @@ export const APP_CONFIG = {
local: {
name: "local",
},
feide: {
name: "oauth2",
},
},
token: {
refresh: {
Expand Down
2 changes: 0 additions & 2 deletions src/auth/bl.auth.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Router } from "express";

import { FacebookAuth } from "./facebook/facebook.auth";
import { FeideAuth } from "./feide/feide.auth";
import { GoogleAuth } from "./google/google.auth";
import { LocalLoginCreator } from "./local/local-login-creator/local-login-creator";
import { LocalLoginHandler } from "./local/local-login.handler";
Expand Down Expand Up @@ -54,6 +53,5 @@ export class BlAuth {
new FacebookAuth(router, resHandler);
new LocalAuth(router, resHandler, localLoginValidator, tokenHandler);
new TokenEndpoint(router, resHandler, tokenHandler);
new FeideAuth(router, resHandler);
}
}
113 changes: 0 additions & 113 deletions src/auth/feide/feide.auth.ts

This file was deleted.

10 changes: 5 additions & 5 deletions src/auth/user/user-provider/user-provider.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ describe("UserProvider", () => {
userValidStub.rejects(new BlError("user is not valid"));

return expect(
userProvider.loginOrCreate("username@mail.com", "feide", "abcdef"),
userProvider.loginOrCreate("username@mail.com", "local", "abcdef"),
).to.eventually.be.rejectedWith(BlError, /user is not valid/);
});

Expand All @@ -59,7 +59,7 @@ describe("UserProvider", () => {
);

return expect(
userProvider.loginOrCreate("username@mail.com", "feide", "abcde"),
userProvider.loginOrCreate("username@mail.com", "local", "abcde"),
).to.eventually.be.rejectedWith(
BlError,
/local login could not be created/,
Expand All @@ -72,7 +72,7 @@ describe("UserProvider", () => {
userCreateStub.rejects(new BlError("user could not be created"));

return expect(
userProvider.loginOrCreate("username@mail.com", "feide", "abcde"),
userProvider.loginOrCreate("username@mail.com", "local", "abcde"),
).to.eventually.be.rejectedWith(BlError, /user could not be created/);
});

Expand All @@ -86,7 +86,7 @@ describe("UserProvider", () => {
createTokenStub.resolves(tokens);

return expect(
userProvider.loginOrCreate("username@mail.com", "feide", "abcdefg"),
userProvider.loginOrCreate("username@mail.com", "local", "abcdefg"),
).to.eventually.be.eql({ user: user, tokens: tokens });
});
});
Expand All @@ -102,7 +102,7 @@ describe("UserProvider", () => {
createTokenStub.resolves(tokens);

return expect(
userProvider.loginOrCreate("username@mail.com", "feide", "abcdefg"),
userProvider.loginOrCreate("username@mail.com", "local", "abcdefg"),
).to.eventually.be.eql({ user: user, tokens: tokens });
});
});
Expand Down

0 comments on commit f0e1f14

Please sign in to comment.