Skip to content

Latest commit

 

History

History
739 lines (501 loc) · 88.3 KB

CHANGELOG.md

File metadata and controls

739 lines (501 loc) · 88.3 KB

@keystone-next/auth

32.0.0

Major Changes

Patch Changes

  • #6414 32f024738 Thanks @mitchellhamilton! - Changed the way the package directory for resolving views is obtained to use __dirname rather than require.resolve('pkg/package.json') because in Next.js 11 require.resolve returns a numeric id instead of the path.

31.0.0

Major Changes

  • #6211 d214e2f72 Thanks @mitchellhamilton! - The update mutations now accept where unique inputs instead of only an id and the where and data arguments are non-null.

    If you have a list called Item, the update mutations now look like this:

    type Mutation {
      updateItem(where: ItemWhereUniqueInput!, data: ItemUpdateInput!): Item
      updateItems(data: [ItemUpdateArgs!]!): [Item]
    }
    
    input ItemUpdateArgs {
      where: ItemWhereUniqueInput!
      data: ItemUpdateInput!
    }

Patch Changes

30.0.0

Major Changes

Patch Changes

29.0.0

Patch Changes

28.0.1

Patch Changes

  • #6029 038cd09a2 Thanks @bladey! - Updated Keystone URL reference from next.keystonejs.com to keystonejs.com.

  • Updated dependencies [038cd09a2, 0988f08c2]:

    • @keystone-next/fields@11.0.3
    • @keystone-next/keystone@21.0.2
    • @keystone-next/types@21.0.1

28.0.0

Patch Changes

  • Updated dependencies [03f535ba6, 03f535ba6]:
    • @keystone-next/keystone@21.0.0
    • @keystone-next/types@21.0.0
    • @keystone-next/fields@11.0.2
    • @keystone-next/admin-ui-utils@5.0.3

27.0.0

Major Changes

  • #5665 a3b07ea16 Thanks @mitchellhamilton! - The core of Keystone has been re-implemented to make implementing fields and new features in Keystone easier. While the observable changes for most users should be minimal, there could be breakage. If you implemented a custom field type, you will need to change it to the new API, see fields in the @keystone-next/fields package for inspiration on how to do this.
  • #5665 a3b07ea16 Thanks @mitchellhamilton! - The way that the implementations of generateHash and compare are passed from the password field to auth has changed to be in the extensions object of the GraphQL output field. Unless you've written your own password field implementation or you're using mismatching versions of @keystone-next/auth and @keystone-next/fields, this won't affect you.

Patch Changes

26.0.0

Major Changes

  • #5806 0eadba2ba Thanks [@list({](https://github.com/list({), [@list({](https://github.com/list({)! - Removed withItemData in favour of a sessionData option to the createAuth() function.

    Previously, withItemData would be used to wrap the config.session argument:

    import { config, createSchema, list } from '@keystone-next/keystone/schema';
    import { statelessSessions, withAuthData } from '@keystone-next/keystone/session';
    import { text, password, checkbox } from '@keystone-next/fields';
    import { createAuth } from '@keystone-next/auth';
    
    const { withAuth } = createAuth({
      listKey: 'User',
      identityField: 'email',
      secretField: 'password',
    });
    
    const session = statelessSessions({ secret: '-- EXAMPLE COOKIE SECRET; CHANGE ME --' });
    
    export default withAuth(
      config({
        lists: createSchema({
    
            fields: {
              email: text({ isUnique: true }),
              password: password(),
              isAdmin: checkbox(),
            },
          }),
          session: withItemData(session, { User: 'id isAdmin' }),
        }),
      })
    );

    Now, the fields to populate are configured on sessionData in createAuth, and withItemData is completely removed.

    import { config, createSchema, list } from '@keystone-next/keystone/schema';
    import { statelessSessions } from '@keystone-next/keystone/session';
    import { text, password, checkbox } from '@keystone-next/fields';
    import { createAuth } from '@keystone-next/auth';
    
    const { withAuth } = createAuth({
      listKey: 'User',
      identityField: 'email',
      secretField: 'password',
      sessionData: 'id isAdmin',
    });
    
    const session = statelessSessions({ secret: '-- EXAMPLE COOKIE SECRET; CHANGE ME --' });
    
    export default withAuth(
      config({
        lists: createSchema({
    
            fields: {
              email: text({ isUnique: true }),
              password: password(),
              isAdmin: checkbox(),
            },
          }),
          session,
        }),
      })
    );
  • #5787 bb4f4ac91 Thanks @timleslie! - Replaced req, session, createContext args to config.ui.pageMiddleware with a context arg.

Patch Changes

  • #5766 a2553ab82 Thanks @gwyneplaine! - Added visually hidden labels to signin / welcome fields for better screen reader experience.

25.0.0

Major Changes

  • #5677 e2232a553 Thanks @timleslie! - Consolidated the @keystone-next/admin-ui package into @keystone-next/keystone.

    If you were directly importing from @keystone-next/admin-ui you can now import the same items from @keystone-next/keystone/admin-ui. If you have @keystone-next/admin-ui in your package.json you should remove it.

Patch Changes

  • #5734 194bbeea2 Thanks @raveling! - The signup copy to create first user now uses active voice.

  • Updated dependencies [19750d2dc, 016ccad82, 8da79e71a, e2232a553]:

    • @keystone-ui/button@5.0.0
    • @keystone-ui/core@3.0.0
    • @keystone-ui/fields@4.0.0
    • @keystone-ui/notice@4.0.0
    • @keystone-next/admin-ui-utils@5.0.0
    • @keystone-next/fields@9.0.0
    • @keystone-next/keystone@18.0.0
    • @keystone-next/types@18.0.0

24.0.0

Patch Changes

23.0.1

Patch Changes

  • #5614 483932276 Thanks @timleslie! - Updated withAuth to respect config.ui.isDisabled. Now works as expected when config.ui is undefined.

23.0.0

Patch Changes

22.0.0

Patch Changes

21.0.0

Major Changes

  • #5397 a5627304b Thanks @bladey! - Updated Node engine version to 12.x due to 10.x reaching EOL on 2021-04-30.

Patch Changes

20.0.0

Patch Changes

19.0.0

Patch Changes

  • Updated dependencies [343b74246]:
    • @keystone-next/keystone@14.0.0
    • @keystone-next/admin-ui@12.0.1

18.0.0

Patch Changes

17.0.0

Patch Changes

  • Updated dependencies [a2c52848a, acc6e9772, acc6e9772]:
    • @keystone-next/admin-ui@11.0.0
    • @keystone-next/keystone@12.0.0
    • @keystone-next/fields@5.2.1

16.0.1

Patch Changes

  • 29a970378 #5011 Thanks @timleslie! - Updated internals to allow for easier documentation.

  • Updated dependencies [aba7c45d7, 9b202b31a]:

    • @keystone-next/fields@5.2.0
    • @keystone-next/admin-ui@10.0.1
    • @keystone-next/keystone@11.0.1
    • @keystone-next/types@14.0.1

16.0.0

Major Changes

  • 490d52c2f #4985 Thanks @timleslie! - Removed protectIdentities from the createAuth arguments. The behaviour is now the same as having protectIdentities: true.
  • 098ce08d7 #4987 Thanks @timleslie! - The passwordReset* fields and magicAuth* fields are only added to the system if passwordResetLink and magicAuthLink respectively are set.
  • a00a382ff #4965 Thanks @timleslie! - Fixed a bug when using passwordResetLink with a secretField other than 'password'. If you used a secretField other than 'password' then the generated fields in your schema will change.

Minor Changes

  • 685347911 #5003 Thanks @timleslie! - Added context argument to sendToken function used by passwordResetLink and magicAuthLink.

Patch Changes

  • 884129fa7 #4928 Thanks @MurzNN! - Fixed a bug which prevented accessing the '/init` path from behind a reverse proxy.

15.0.0

Major Changes

  • 8d0be8a89 #4815 Thanks @timleslie! - Added a .sudo() method to context objects, which is equivalent to the common operation context.createContext({ skipAccessControl: true }).

Minor Changes

Patch Changes

14.0.0

Patch Changes

13.0.0

Patch Changes

  • Updated dependencies [94fbb45f1, 588be9ea1]:
    • @keystone-next/keystone@9.2.0
    • @keystone-next/types@11.0.2

12.0.0

Patch Changes

11.0.0

Patch Changes

10.0.1

Patch Changes

  • Updated dependencies [24ecd72e5]:
    • @keystone-next/admin-ui@7.0.1
    • @keystone-next/fields@4.0.3
    • @keystone-next/types@10.0.0
    • @keystone-next/admin-ui-utils@2.0.6
    • @keystone-next/keystone@9.0.1

10.0.0

Major Changes

Patch Changes

9.0.0

Patch Changes

  • Updated dependencies [075ef1628]:
    • @keystone-next/admin-ui@6.0.0
    • @keystone-next/keystone@8.0.0
    • @keystone-next/types@8.0.0
    • @keystone-next/fields@4.0.1
    • @keystone-next/admin-ui-utils@2.0.4

8.0.0

Patch Changes

7.0.0

Patch Changes

  • dc58df5c8 #4493 Thanks @timleslie! - Renamed SerializedFieldMeta.views to SerializedFieldMeta.viewsIndex to makes it clear that this is the index, not the views object itself.
  • 2da044a0c #4482 Thanks @timleslie! - Removed config from type KeystoneSystem. The config object is now explicitly passed around where needed to make it clear which code is consuming it. Type KeystoneAdminUIConfig.getAdditionalFiles now takes a config parameter.

6.0.0

Patch Changes

  • dfed54074 #4433 Thanks @JedWatson! - Updated InitPage to fix the error with the new field value shape

  • Updated dependencies [b6498d9f1, d36e580cc, 803626e88]:

    • @keystone-next/keystone@5.0.0
    • @keystone-next/types@5.0.0
    • @keystone-next/admin-ui@3.1.2
    • @keystone-next/admin-ui-utils@2.0.1
    • @keystone-next/fields@3.2.1

5.0.1

Patch Changes

  • 8543f732b #4371 Thanks @timleslie! - Fixed the generateToken algorithm to reduce the chance of generating a short token.
  • 2c5135f17 #4370 Thanks @timleslie! - Updated getMagicAuthLinkSchema code to use items API rather than adapter. Fixed hard-coding of listKey: 'User' when redeeming tokens.
  • 139c74a4a #4378 Thanks @timleslie! - Updated code to consistently use context rather than ctx for graphQL context variables.

5.0.0

Minor Changes

Patch Changes

  • d2ebd1c39 #4308 Thanks @timleslie! - Updated createInitialItem to use the items API rather than direct adapter access.

4.0.0

Major Changes

  • cc987d078 #4269 Thanks @timleslie! - Renamed keystone argument of KeystoneAdminUIConfig.getAdditionalFiles() and KeystoneAdminUIConfig.pageMiddleware() to system. Renamed keystone argument of SessionStrategy.start, SessionStrategy.end and SessionStrategy.get to system.

Patch Changes

  • 60d30b238 #4305 Thanks @timleslie! - Updated attemptAuthentication to use the items API rather than direct adapter access.

3.0.0

Patch Changes

2.0.1

Patch Changes

  • Updated dependencies [6c3b566a1, c3e4c1e3f, d6139dcf9, 39a5890de]:
    • @keystone-ui/button@2.0.0
    • @keystone-ui/notice@1.0.1
    • @keystone-ui/core@1.0.1
    • @keystone-next/fields@2.0.1
    • @keystone-next/admin-ui@2.0.1

2.0.0

Patch Changes

1.0.0

Major Changes

Patch Changes

  • Updated dependencies [9d360a67b]:
    • @keystone-ui/button@1.0.0
    • @keystone-ui/core@1.0.0
    • @keystone-ui/fields@1.0.0
    • @keystone-ui/notice@1.0.0
    • @keystone-next/admin-ui@1.0.0
    • @keystone-next/fields@1.0.0
    • @keystone-next/keystone@1.0.0
    • @keystone-next/types@1.0.0