nextauthjs / next-auth

Authentication for the Web.
https://authjs.dev
ISC License
24.78k stars 3.49k forks source link

TikTok Provider #6540

Closed sdairs closed 1 year ago

sdairs commented 1 year ago

Description 📓

It would be awesome to have an OOTB Provider for TikTok.

TikTok login docs here https://developers.tiktok.com/doc/login-kit-web/

How to reproduce ☕️

I got it working with the following custom config, but something OOTB would be great:

    {
      id: "tiktok",
      name: "TikTok",
      type: "oauth",
      version: "2.0",
      clientId: process.env.TIKTOK_CLIENT_KEY,
      clientSecret: process.env.TIKTOK_CLIENT_SECRET,
      authorization: {
        url: "https://www.tiktok.com/auth/authorize/",
        params: {
          scope: "user.info.basic,video.list",
          response_type: "code",
          client_key: process.env.TIKTOK_CLIENT_KEY,
          redirect_uri: "https://url/api/auth/signin",
        },
      },
      token: {
        url: "https://open-api.tiktok.com/oauth/access_token/",
        params: {
          client_key: process.env.TIKTOK_CLIENT_KEY,
          client_secret: process.env.TIKTOK_CLIENT_SECRET,
          grant_type: "authorization_code",
        },
      },
      userinfo: "https://open-api.tiktok.com/user/info/",
      profile(profile) {
        return {
          profile: profile,
          id: profile.open_id,
        };
      },
      checks: ["state"],
    },

Contributing 🙌🏽

Yes, I am willing to help implement this feature in a PR

balazsorban44 commented 1 year ago

Want to open a PR against https://github.com/nextauthjs/next-auth/tree/main/packages/core/src/providers?

sdairs commented 1 year ago

This isn't really my area of expertise but gave it a go! https://github.com/nextauthjs/next-auth/pull/6546

stale[bot] commented 1 year ago

It looks like this issue did not receive any activity for 60 days. It will be closed in 7 days if no further activity occurs. If you think your issue is still relevant, commenting will keep it open. Thanks!

stale[bot] commented 1 year ago

To keep things tidy, we are closing this issue for now. If you think your issue is still relevant, leave a comment and we might reopen it. Thanks!