Skip to content

Integrate with https://github.com/chas-academy/chas-academy-helplist/ #20

Open
@lessp

Description

@lessp

Epic:

Parent of #21
Parent of #22


My current idea is to migrate all the data from the previous help-app to the new one. I've begun to experiment with "Sign in with Slack" and current have a basic implementation working for it.

We could then map requests from the front-end to the backend similarly like the /mayday-route does.

We could then just use the current implementation of the Event-handler since method-calls like Slack.IO.isAdmin uses the Slack user-id.

Auth-response from Slack:

Easiest would be to just save it in the session in Express.

{
  ok: true,
  access_token: 'xxx',
  scope:
    'identify,bot,commands,identity.basic,identity.email,identity.avatar,identity.team',
  user: {
    name: 'Tom Ekander',
    id: 'U6RUUDBS9',
    email: '[email protected]',
    image_24:
      'https://avatars.slack-edge.com/2019-01-17/526520224852_7ac07601bca38d598a15_24.png',
    image_32:
      'https://avatars.slack-edge.com/2019-01-17/526520224852_7ac07601bca38d598a15_32.png',
    image_48:
      'https://avatars.slack-edge.com/2019-01-17/526520224852_7ac07601bca38d598a15_48.png',
    image_72:
      'https://avatars.slack-edge.com/2019-01-17/526520224852_7ac07601bca38d598a15_72.png',
    image_192:
      'https://avatars.slack-edge.com/2019-01-17/526520224852_7ac07601bca38d598a15_192.png',
    image_512:
      'https://avatars.slack-edge.com/2019-01-17/526520224852_7ac07601bca38d598a15_512.png',
    image_1024:
      'https://avatars.slack-edge.com/2019-01-17/526520224852_7ac07601bca38d598a15_1024.png',
  },
  team: {
    id: 'T4WV23X5X',
    name: 'Chas Academy',
    domain: 'chasacademy',
    image_34:
      'https://avatars.slack-edge.com/2017-04-11/168353106134_54bac3f3c035be918326_34.png',
    image_44:
      'https://avatars.slack-edge.com/2017-04-11/168353106134_54bac3f3c035be918326_44.png',
    image_68:
      'https://avatars.slack-edge.com/2017-04-11/168353106134_54bac3f3c035be918326_68.png',
    image_88:
      'https://avatars.slack-edge.com/2017-04-11/168353106134_54bac3f3c035be918326_88.png',
    image_102:
      'https://avatars.slack-edge.com/2017-04-11/168353106134_54bac3f3c035be918326_102.png',
    image_132:
      'https://avatars.slack-edge.com/2017-04-11/168353106134_54bac3f3c035be918326_132.png',
    image_230:
      'https://avatars.slack-edge.com/2017-04-11/168353106134_54bac3f3c035be918326_230.png',
    image_original:
      'https://avatars.slack-edge.com/2017-04-11/168353106134_54bac3f3c035be918326_original.png',
  },
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    backlogenhancementNew feature or requesthelp wantedExtra attention is neededquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions