GithubHelp home page GithubHelp logo

crypter's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

khh4vdd

crypter's Issues

Angular throws a http errors in browser console even if they are caught in application

When authorization is failed API respond 404 status code and for this case an applications catches an error

https://github.com/someApprentice/Crypter/blob/master/src/app/auth/auth.service.ts#L36
https://github.com/someApprentice/Crypter/blob/master/src/app/auth/auth.service.ts#L61-L63

But somehow Angular throws the error anyway

POST http://localhost:4000/api/login 404 (Not Found)
_ @ polyfills.1ef83d22ada557f4a131.js:1
n.scheduleTask @ polyfills.1ef83d22ada557f4a131.js:1
onScheduleTask @ polyfills.1ef83d22ada557f4a131.js:1
n.scheduleTask @ polyfills.1ef83d22ada557f4a131.js:1
t.scheduleTask @ polyfills.1ef83d22ada557f4a131.js:1
t.scheduleMacroTask @ polyfills.1ef83d22ada557f4a131.js:1
p @ polyfills.1ef83d22ada557f4a131.js:1
(anonymous) @ polyfills.1ef83d22ada557f4a131.js:1
H.a.(anonymous function) @ polyfills.1ef83d22ada557f4a131.js:1
(anonymous) @ main.1ce17900a4d53c7a028c.js:1
t._trySubscribe @ main.1ce17900a4d53c7a028c.js:1
t.subscribe @ main.1ce17900a4d53c7a028c.js:1
(anonymous) @ main.1ce17900a4d53c7a028c.js:1
J @ main.1ce17900a4d53c7a028c.js:1
e._innerSub @ main.1ce17900a4d53c7a028c.js:1
e._tryNext @ main.1ce17900a4d53c7a028c.js:1
e._next @ main.1ce17900a4d53c7a028c.js:1
e.next @ main.1ce17900a4d53c7a028c.js:1
(anonymous) @ main.1ce17900a4d53c7a028c.js:1
t._trySubscribe @ main.1ce17900a4d53c7a028c.js:1
t.subscribe @ main.1ce17900a4d53c7a028c.js:1
t.call @ main.1ce17900a4d53c7a028c.js:1
t.subscribe @ main.1ce17900a4d53c7a028c.js:1
t.call @ main.1ce17900a4d53c7a028c.js:1
t.subscribe @ main.1ce17900a4d53c7a028c.js:1
t.call @ main.1ce17900a4d53c7a028c.js:1
t.subscribe @ main.1ce17900a4d53c7a028c.js:1
t.call @ main.1ce17900a4d53c7a028c.js:1
t.subscribe @ main.1ce17900a4d53c7a028c.js:1
t.call @ main.1ce17900a4d53c7a028c.js:1
t.subscribe @ main.1ce17900a4d53c7a028c.js:1
t.login @ main.1ce17900a4d53c7a028c.js:1
(anonymous) @ main.1ce17900a4d53c7a028c.js:1
handleEvent @ main.1ce17900a4d53c7a028c.js:1
handleEvent @ main.1ce17900a4d53c7a028c.js:1
ea @ main.1ce17900a4d53c7a028c.js:1
(anonymous) @ main.1ce17900a4d53c7a028c.js:1
e.object.o @ main.1ce17900a4d53c7a028c.js:1
e.__tryOrUnsub @ main.1ce17900a4d53c7a028c.js:1
e.next @ main.1ce17900a4d53c7a028c.js:1
e._next @ main.1ce17900a4d53c7a028c.js:1
e.next @ main.1ce17900a4d53c7a028c.js:1
e.next @ main.1ce17900a4d53c7a028c.js:1
e.emit @ main.1ce17900a4d53c7a028c.js:1
e.onSubmit @ main.1ce17900a4d53c7a028c.js:1
(anonymous) @ main.1ce17900a4d53c7a028c.js:1
handleEvent @ main.1ce17900a4d53c7a028c.js:1
handleEvent @ main.1ce17900a4d53c7a028c.js:1
ea @ main.1ce17900a4d53c7a028c.js:1
(anonymous) @ main.1ce17900a4d53c7a028c.js:1
(anonymous) @ main.1ce17900a4d53c7a028c.js:1
n.invokeTask @ polyfills.1ef83d22ada557f4a131.js:1
onInvokeTask @ main.1ce17900a4d53c7a028c.js:1
n.invokeTask @ polyfills.1ef83d22ada557f4a131.js:1
t.runTask @ polyfills.1ef83d22ada557f4a131.js:1
t.invokeTask @ polyfills.1ef83d22ada557f4a131.js:1
k @ polyfills.1ef83d22ada557f4a131.js:1
g @ polyfills.1ef83d22ada557f4a131.js:1

Importing the zone.js/dist/zone-error in environment files doesn't actually affects anything.

This behavior isn't occurs in the test environment via Karma/Jasmine.

Resign jwt token if expired

For now JWT token is inexpirable. It need to be done expirable along with Cookies and resign both of them if they expired.

#3

Imports of Sequelize models removes during compilation

All Sequelize models defined in an external file removes from the main file during compilation. This behavior happened during a tests which is performed with ts-jest.

Need to find a way to configure this library that all dependencies was imported.

https://github.com/someApprentice/Crypter/blob/master/api/services/Database.ts#L18
https://github.com/someApprentice/Crypter/blob/master/api/api.ts#L3
https://github.com/someApprentice/Crypter/blob/master/api/api.ts#L27

Jest test keeps running despite the absence of asynchronous processes

Despite the fact that the option --detectOpenHandles does not show any asynchronous process, the test process cannot stop.

--force-exit is still a solution, but the console still gives an error

Have you considered using `--detectOpenHandles` to detect async operations that
kept running after all tests finished?

Jest test keep running async operations wich keeping it from exit

Literally to say Jest keeps opened the express server and to work around this issue need ran tests with --force-exit option.

Need to find a way to shutdown the server after all test is done.

    //Jest has detected the following 1 open handle potentially keeping Jest from exiting:
    // > 60 | server.listen(PORT, () => {
    //      |        ^
    //   61 |   console.log(`Node server listening on http://localhost:${PORT}`);
    //   62 | });
    // at Function.listen (node_modules/express/lib/application.js:618:24)
    // at Object.<anonymous> (server.ts:60:8)

Implement localStorage expiration

If Cookies will expire the server will respond log off version of page. That may cause problems with frontend application since it relies on localStorage.

The localStorage items has to have expiration time.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.