canvaslink v0.0.15
CanvasLink and CanvasLink CLI
What is CanvasLink?
CanvasLink is an (unofficial) open source TypeScript library for Node.js that allows you to easily interface with Canvas LMS GraphQL APIs.
CanvasLink:
- works with any user account, including student accounts
- works for any institution with a publicly accessible Canvas LMS domain
- does not require developer or administrator level API access
- cleanly handles user authentication
Authentication and Security
On initial use, CanvasLink will launch puppeteer in headfull mode to obtain authorization tokens. This allows for compatibility with any arbitrary SSO service specific to a given institution and also prevents sensitive user credentials from contaminating the runtime.
These tokens are stored and automatically refreshed with regular usage. Should these tokens expire, CanvasLink will re-prompt authorization.
Optionally, you can request CanvasLink to store credentials on disk and automatically refresh expired tokens without user intervention. This may be desirable if, for example, the institution's SSO service distributes tokens with a very short lifetime.
Note: If your SSO requires 2FA, you will still need to manually authorize using the secondary authorizer. If CanvasLink fails to sign in due to a navigation error, you may need to implement custom sign in navigation instructions.
Warning: Using this option will store credentials in plaintext on disk. This option is inherently insecure and likely unnecessary, as refresh tokens can often sustain a single sign-in session for months or even years.