Skip to content

Amazon Cognito Auth Provider Support #3469

Discussion options

You must be logged in to vote

For anyone looking for drop-in authProvider with amplify-js cognito integration:

import { AuthBindings } from "@refinedev/core";
import { Amplify, Auth } from "aws-amplify";
import type { AuthActionResponse } from "@refinedev/core/dist/interfaces";
import { env } from "./env";

Amplify.configure({
  Auth: {
    // fixme: set your own ids.
    userPoolId: env.VITE_USERPOOL_ID,
    userPoolWebClientId: env.VITE_USERPOOL_WEB_CLIENT_ID,
  },
});

interface CognitoUser {
  username: string;
  attributes: {
    name: string;
    picture?: string;
    email: string;
    // fixme: put your own permission attribute here if you have one.
    // "custom:permissions"?: string;
  };
}

const getErrorR…

Replies: 9 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

omeraplak
Oct 14, 2022
Maintainer Author

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

omeraplak
Oct 14, 2022
Maintainer Author

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

omeraplak
Oct 20, 2022
Maintainer Author

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@omeraplak
Comment options

omeraplak Oct 26, 2023
Maintainer Author

@Lagyu
Comment options

Answer selected by omeraplak
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
4 participants
Converted from issue

This discussion was converted from issue #2760 on January 26, 2023 11:18.