Skip to content
This repository was archived by the owner on Sep 2, 2022. It is now read-only.
This repository was archived by the owner on Sep 2, 2022. It is now read-only.

Auth token terminology #740

@schickling

Description

@schickling

There are several types of authentication tokens used in the context of Graphcool. Here is a naming proposal:

System Token

A token being used to authenticate a developer against the System API (for deployments etc) either from the Console or CLI. This token is not meant to be used manually be a developer. For convenience reasons the system token also has the capabilities of a root token.

Root Token

Created statically via the graphcool.yml file when deployed and can be retrieved by running gc get-root-token my-token-key. This gives full read and write access to all client APIs.

Temporary Root Token

A temporary root token is instantiated before a function is called and automatically injected. A temporary root token is a root token that cannot be referenced outside this scope of the invoked function (e.g. via gc get-root-token) and expires after 5min (configurable via server.yml).

Node Token

A node token is for client-side authentication/authorization purposes (e.g. sign in with Facebook) and authenticates a specific data node of a certain type (for example a User node). A node token can be issued via the generateNodeToken(nodeId: string, typeName: string, payload?: ScalarObject) function in the graphcool-lib library.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions