Skip to content

Accounts API: Sign-In with <email> <password> #4

@mster

Description

@mster

Background:

The ncm-cli tool supports two types of login.

  1. via email and password
  2. via SSO (Google, GitHub)

When logging in, the response from /accounts/auth/login comes in the form of:

{ userId: '...',
  session: '...',
  refreshToken: '...' }

Similarly, the SSO login request also receives a session and refreshToken.

Issue:

When verifying a package or dependency tree using v1 of the ncm2-api, an authorization token must be passed in the request.

  • If the user has logged in via SSO, the session token received is valid and allows for successful ncm2-api calls to be made. (no issue)
  • If the user has logged in via email/password, the session token received seems to be unsupported by the ncm2-api

The error output is as follows:

Error: GraphQL Error (Code: 401): {"response":{"message":"You do not have permission","code":"Auth::PermissionDenied","status":401},"request":{"{ ... }"}}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions