Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

De-authentication between discord/frontend #100

Open
walmat opened this issue Nov 1, 2018 · 6 comments
Open

De-authentication between discord/frontend #100

walmat opened this issue Nov 1, 2018 · 6 comments
Labels
area:frontend Related to Nebula's Frontend Electron app priority:urgent Issues that need to be solved right away type:bug Something isn't working
Milestone

Comments

@walmat
Copy link
Owner

walmat commented Nov 1, 2018

Describe the bug
Once a user has "deactivated" from the discord bot by sending !deactivate <key>, they are still authenticated on a close -> relaunch of the application. Also, the user may not deactivate from the frontend after they have sent the discord bot the deactivate command. While this is the "expected" behavior, we may want to handle this case and just clear the session even if the key is not found or something.

To Reproduce
Steps to reproduce the behavior:

  1. Successfully authenticate the frontend with your key
  2. Go to the discord bot and send !deactivate <key>
    3a. Attempt to deactivate from the frontend
    3b. Attempt to close & reopen the frontend (should be deactivated)

Expected behavior
3a should allow you to deactivate still, and 3b should require reauthentication

Desktop (please complete the following information):

  • OS: All
  • Service: Frontend, Discord Bot, API
  • Version: 1.0.0
@walmat walmat added type:bug Something isn't working area:frontend Related to Nebula's Frontend Electron app labels Nov 1, 2018
@pr1sm
Copy link
Collaborator

pr1sm commented Nov 5, 2018

I believe at this point, we have no communication between the discord bot and the frontend of a users machine.

The change will eventually propagate as the access jwt we store expires every 2 days IIRC. So the user would still be allowed to use the frontend until the jwt expires. Once the jwt expires, the frontend would then make an api request, find that the key was deactivated, then kick the user to the auth screen.

@pr1sm
Copy link
Collaborator

pr1sm commented Nov 5, 2018

We should look in-depth into some options for speeding this up. Here are a few off the top of my head. We should discuss them deeper to nail down the pros and cons:

  1. Shorten the expiration time for the jwt to force the reauth check to happen faster
  2. Enable a small service in the frontend that would allow external communication requests (the discord bot could send a request to deactivate)
  3. Leave the same [re]auth check on startup, but force any actions that make outside requests (i.e. task related actions) to perform an auth check before starting. If the auth check fails, the user would be kicked out to the auth screen
  4. Remove the jwt token auth altogether and require the user to make a standard auth request everytime the frontend starts

@walmat
Copy link
Owner Author

walmat commented Nov 5, 2018

Maybe do a combination of these? I like the first 3 options honestly.

@pr1sm
Copy link
Collaborator

pr1sm commented Nov 9, 2018

👍 We can do a combo! Will tackle this after we release the beta

@walmat
Copy link
Owner Author

walmat commented Feb 1, 2019

Maybe for the sake of open beta, we just try and tackle #4?

@pr1sm pr1sm removed this from the Beta 4 Release milestone Feb 2, 2019
@pr1sm pr1sm added the priority:high Issues that are high priority, but don't need to be solved ASAP label Feb 11, 2019
@walmat walmat added priority:urgent Issues that need to be solved right away and removed priority:high Issues that are high priority, but don't need to be solved ASAP labels May 9, 2019
@walmat walmat added this to the Release v1.0.1 milestone May 9, 2019
@pr1sm
Copy link
Collaborator

pr1sm commented May 11, 2019

punting this to a 1.0.2 or 1.1.0 release

@pr1sm pr1sm removed this from the Release v1.0.1 milestone May 11, 2019
@walmat walmat added this to the 1.3.0 milestone Oct 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:frontend Related to Nebula's Frontend Electron app priority:urgent Issues that need to be solved right away type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants