Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Update to use M2M token for Topcoder-X #128

Closed
jmgasper opened this issue Jan 17, 2019 · 1 comment
Closed

Update to use M2M token for Topcoder-X #128

jmgasper opened this issue Jan 17, 2019 · 1 comment

Comments

@jmgasper
Copy link
Collaborator

jmgasper commented Jan 17, 2019

Current

Currently, when using the Challenge API, we have to:

  • Login with a service account
  • Upgrade the token to a v3 token

Only after that can we use the API.

Problem

The problem with that flow is that Auth0, the login provider, rate limits us, so we've been having issues where things aren't getting handled in Topcoder-X because the login flow is failing.

Solution

Topcoder APIs now support M2M tokens, so we are going to strip out the service account support and move to M2M tokens instead.

The latest release can be found here:

https://github.com/appirio-tech/tc-core-library-js/releases/tag/v2.4

This isn't in NPM yet, so we'll have to update this as a git ref in the package.json.

Example

Example usage for token generation can be seen in the v5 sub api here

https://github.com/topcoder-platform/submissions-api/blob/develop/src/common/helper.js#L16

helper.js.zip

@afrisalyp
Copy link
Collaborator

Hi @jmgasper,

Can we find any document that helps us to get or generate the AUTH0_CLIENT_ID and AUTH0_CLIENT_SECRET?

I've learned how to use the M2M tokens and it needs AUTH0_CLIENT_ID and AUTH0_CLIENT_SECRET.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants