Mercurius Auth Plugin

Overview

mercurius-auth

CI workflow

Mercurius Auth is a plugin for Mercurius that adds configurable Authentication and Authorization support.

Features:

  • Define auth directives on fields anywhere in your schema and this plugin will apply custom policies against these protected fields when a GraphQL request is made.
  • Works in both normal and gateway mode.
  • In addition to the matching auth directive, auth policies have access to the same GraphQL information that any GraphQL resolver has access to.
  • Build up an auth context to load identities onto the context before policies are applied.
  • Define custom errors.
  • GraphQL spec compliant.

Docs

Install

npm i fastify mercurius mercurius-auth

Quick Start

'use strict'

const Fastify = require('fastify')
const mercurius = require('mercurius')
const mercuriusAuth = require('mercurius-auth')

const app = Fastify()

const schema = `
  directive @auth(
    requires: Role = ADMIN,
  ) on OBJECT | FIELD_DEFINITION

  enum Role {
    ADMIN
    REVIEWER
    USER
    UNKNOWN
  }

  type Query {
    add(x: Int, y: Int): Int @auth(requires: USER)
  }
`

const resolvers = {
  Query: {
    add: async (_, { x, y }) => x + y
  }
}

app.register(mercurius, {
  schema,
  resolvers
})

app.register(mercuriusAuth, {
  authContext (context) {
    return {
      identity: context.reply.request.headers['x-user']
    }
  },
  async applyPolicy (authDirectiveAST, parent, args, context, info) {
    return context.auth.identity === 'admin'
  },
  authDirective: 'auth'
})

app.listen(3000)

Examples

Check GitHub repo for more examples.

Benchmarks

Normal GraphQL Server Mode | Without Auth

Last run: 2021-04-21

┌─────────┬──────┬──────┬───────┬───────┬─────────┬─────────┬───────┐
│ Stat    │ 2.5% │ 50%  │ 97.5% │ 99%   │ Avg     │ Stdev   │ Max   │
├─────────┼──────┼──────┼───────┼───────┼─────────┼─────────┼───────┤
│ Latency │ 4 ms │ 5 ms │ 9 ms  │ 13 ms │ 5.21 ms │ 2.01 ms │ 57 ms │
└─────────┴──────┴──────┴───────┴───────┴─────────┴─────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬──────────┬─────────┬─────────┐
│ Stat      │ 1%      │ 2.5%    │ 50%     │ 97.5%   │ Avg      │ Stdev   │ Min     │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼─────────┼─────────┤
│ Req/Sec   │ 11135   │ 11135   │ 18223   │ 18671   │ 17550.19 │ 2049.52 │ 11134   │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼─────────┼─────────┤
│ Bytes/Sec │ 5.86 MB │ 5.86 MB │ 9.58 MB │ 9.82 MB │ 9.23 MB  │ 1.08 MB │ 5.86 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴──────────┴─────────┴─────────┘

Req/Bytes counts sampled once per second.
193k requests in 11.03s, 102 MB read

Normal GraphQL Server Mode | With Auth

Last run: 2021-04-21

┌─────────┬──────┬──────┬───────┬───────┬─────────┬────────┬───────┐
│ Stat    │ 2.5% │ 50%  │ 97.5% │ 99%   │ Avg     │ Stdev  │ Max   │
├─────────┼──────┼──────┼───────┼───────┼─────────┼────────┼───────┤
│ Latency │ 5 ms │ 5 ms │ 10 ms │ 14 ms │ 5.59 ms │ 2.1 ms │ 64 ms │
└─────────┴──────┴──────┴───────┴───────┴─────────┴────────┴───────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬──────────┬─────────┬─────────┐
│ Stat      │ 1%      │ 2.5%    │ 50%     │ 97.5%   │ Avg      │ Stdev   │ Min     │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼─────────┼─────────┤
│ Req/Sec   │ 9463    │ 9463    │ 17279   │ 17583   │ 16586.55 │ 2260.65 │ 9459    │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼─────────┼─────────┤
│ Bytes/Sec │ 4.98 MB │ 4.98 MB │ 9.08 MB │ 9.25 MB │ 8.72 MB  │ 1.19 MB │ 4.98 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴──────────┴─────────┴─────────┘

Req/Bytes counts sampled once per second.
182k requests in 11.03s, 96 MB read

Gateway GraphQL Server Mode | Without Auth

Last run: 2021-04-21

┌─────────┬───────┬───────┬───────┬───────┬──────────┬──────────┬────────┐
│ Stat    │ 2.5%  │ 50%   │ 97.5% │ 99%   │ Avg      │ Stdev    │ Max    │
├─────────┼───────┼───────┼───────┼───────┼──────────┼──────────┼────────┤
│ Latency │ 29 ms │ 32 ms │ 66 ms │ 88 ms │ 34.96 ms │ 11.57 ms │ 195 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴──────────┴────────┘
┌───────────┬────────┬────────┬─────────┬────────┬────────┬────────┬────────┐
│ Stat      │ 1%     │ 2.5%   │ 50%     │ 97.5%  │ Avg    │ Stdev  │ Min    │
├───────────┼────────┼────────┼─────────┼────────┼────────┼────────┼────────┤
│ Req/Sec   │ 1286   │ 1286   │ 3039    │ 3135   │ 2819.5 │ 543.65 │ 1286   │
├───────────┼────────┼────────┼─────────┼────────┼────────┼────────┼────────┤
│ Bytes/Sec │ 450 kB │ 450 kB │ 1.06 MB │ 1.1 MB │ 987 kB │ 190 kB │ 450 kB │
└───────────┴────────┴────────┴─────────┴────────┴────────┴────────┴────────┘

Req/Bytes counts sampled once per second.
28k requests in 10.03s, 9.87 MB read

Gateway GraphQL Server Mode | With Auth

Last run: 2021-04-21

┌─────────┬───────┬───────┬───────┬───────┬──────────┬──────────┬────────┐
│ Stat    │ 2.5%  │ 50%   │ 97.5% │ 99%   │ Avg      │ Stdev    │ Max    │
├─────────┼───────┼───────┼───────┼───────┼──────────┼──────────┼────────┤
│ Latency │ 29 ms │ 33 ms │ 69 ms │ 93 ms │ 35.92 ms │ 12.46 ms │ 209 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴──────────┴────────┘
┌───────────┬────────┬────────┬─────────┬────────┬────────┬────────┬────────┐
│ Stat      │ 1%     │ 2.5%   │ 50%     │ 97.5%  │ Avg    │ Stdev  │ Min    │
├───────────┼────────┼────────┼─────────┼────────┼────────┼────────┼────────┤
│ Req/Sec   │ 1216   │ 1216   │ 2943    │ 3129   │ 2744.7 │ 552.54 │ 1216   │
├───────────┼────────┼────────┼─────────┼────────┼────────┼────────┼────────┤
│ Bytes/Sec │ 426 kB │ 426 kB │ 1.03 MB │ 1.1 MB │ 961 kB │ 193 kB │ 426 kB │
└───────────┴────────┴────────┴─────────┴────────┴────────┴────────┴────────┘

Req/Bytes counts sampled once per second.
27k requests in 10.03s, 9.61 MB read

License

MIT

Comments
  • Add basic implementation

    Add basic implementation

    Closes: https://github.com/mercurius-js/auth/issues/1

    PR so you can follow my progress as I head towards shipping v1.0 :)

    Still todo:

    • [x] Add Application Lifecycle hook to Mercurius
    • [x] Make auth directive configurable
    • [x] Go over validation options and add more tests for these
    • [x] Define symbols for internals
    • [x] Use resolver overrides
    • [x] More tests for the gateway
    • [x] General tidy up of codebase
    • [x] Set custom auth errors
    • [x] Improve performance (using current Benchmarks with and without Auth as a reference)
    • [x] Docs
    • [x] Examples
    opened by jonnydgreen 15
  • feat: filtered introspection queries

    feat: filtered introspection queries

    Implements #43

    I'm creating this draft PR to get some feedback about this implementation.

    How it works

    Every directive adds a preExecution hook. The hook will:

    • understand if the input query is an introspection
    • if an introspection query is found:
      • it executes the directive's applyPolicy for every FIELDS the directive is attached to
      • the applyPolicy function runs without the parent object and the input arguments (it should be fine)
      • based on the applyPolicy result, the hook filters the GraphQLSchema object by filtering the FIELDS or OBJECTS associated with the directive itself
    • the hook will return the filtered schema to the next preExecution function

    Note that understanding if the query is an introspection one is necessary or the authorization errors will no more be visible.

    Example:

    • read an @auth Query
    • the filter hook will understand that the user is not authenticated executing the applyPolicy function
    • the @auth FIELD are evicted from the schema
    • the query is executed against the filtered schema, so the directive's fields are no more in the schema, and they cannot trigger the auth error
    • the output for those fields will be null without the corresponding error.

    Todos

    I think this PR requires many optimizations:

    • [x] improve the isIntrospection function
    • [x] execute the isIntrospection once (now it is executed one time for each directive)
    • [x] how could we run the wrapSchema filtering function once instead of one time for each directive. The main issue here is that the plugin is registered multiple times
    • [x] applyPolicy memoization. it cannot be executed once due different parameters. Example @hasRole(role: "admin") vs @hasRole(role: "reader")
    • [x] how to handle multiple queries into one request. EDIT: one inspection query triggers the filtering
    • [ ] documentation

    Let me know your thought

    opened by Eomm 14
  • How I can set custom directives to the current field?

    How I can set custom directives to the current field?

    Hi guys, How I can set custom directives to the current field through Javascript code?

    I created a custom Directive:

    const authDirective = new GraphQLDirective({
        name: 'auth',
        locations: [DirectiveLocation.OBJECT, DirectiveLocation.FIELD_DEFINITION],
        args: ...
    })
    

    Added to the schema:

    const schema = new GraphQLSchema({
        directives: [authDirective],
        query: new GraphQLObjectType({
            fields: {
                secretData: ...
            }
        })
    })
    

    How I can use my directive only for the secretData field?

    I tried to add a directives parameter for field definition but it doesn't work:

    {
        type: validateWidgetQLType,
        args: validateWidgetQLArgs,
        directives: [
            { name: 'auth', arguments: { requires: 0 }}
        ],
    }
    

    Please help!

    opened by dmitrydrynov 14
  • Failed authorization throws Http 500

    Failed authorization throws Http 500

    Hello everyone!

    When this plugin returns an error, of any type, it uses HTTP 500 as status code. In this case Apollo (for Angular) treat it as networkError instead of graphQlErrors, making it difficult to handle. I'm doing something wrong?

    opened by artecoop 12
  • auth directive on type not being processed, federated service

    auth directive on type not being processed, federated service

    I have multiple federated services, and each schema looks similar to the following:

    directive @auth(requires: String!) on OBJECT | FIELD_DEFINITION
    extend type Query {
      """
      Provide information about an account's balances
      """
      inqAcctAvail(
        clientId: Int!
        acctId: String!
        suffix: Int
      ): AcctAvail @auth(requires: "inqAcctAvail")
    }
    
    type AcctAvail @auth(requires: "inqAcctAvail") @key(fields: "clientId acctId suffix") {
      clientId: Int
      acctId: String
      suffix: Int
    
      """
      Available money from AAS realtime auth system
      """
      availMoney: Float
    
      """
      Available cash from AAS realtime auth system
      """
      availCash: Float
    }
    

    My auth function looks like so:

    app.register(mercuriusAuth, {
        authContext(context) {
          const {
            reply: {
              request: {
                headers,
              },
            },
          } = context;
          if (headers.introspect === 'true') {
            return {};
          }
          if (!headers['gql-auth']) {
            throw new Error('Not authorized');
          }
          return {
            identity: JSON.parse(context.reply.request.headers['gql-auth']),
          };
        },
        async applyPolicy(
          authDirectiveAST,
          source,
          { clientId: argClientId },
          {
            auth: {
              identity,
            },
          },
        ) {
          const findArg = (arg, ast) => {
            let result;
            ast.arguments.forEach((a) => {
              if (a.kind === 'Argument'
                && a.name.value === arg) {
                result = a.value.value;
              }
            });
            return result;
          };
          const requires = findArg('requires', authDirectiveAST);
          let srcClientId;
          if (source) {
            srcClientId = source.clientId;
          }
          const clientId = argClientId || srcClientId;
          if (!requires
            || (
              process.env.NODE_ENV !== 'production'
              && identity.roles.includes(':admin')
            )) {
            return true;
          }
          if (!identity.roles.includes(`${pad(clientId, 4)}:${requires}`)) {
            throw new Error('User does not have access');
          }
          return true;
        },
        authDirective: 'auth',
      });
    

    When testing my inqAcctAvail query, the auth works perfectly. However when testing the AcctAvail type through an entity call, the applyPolicy is not being triggered through my test, thus it is failing.

    Test:

    test('should throw error, entity not authorized', async (t) => {
      const variables = {
        representations: [
          {
            __typename: 'AcctAvail',
            clientId: 5555,
            acctId: '10000000001',
            suffix: 0,
          },
        ],
      };
      const query = '
          query EntitiesQuery($representations: [_Any!]!) {
            _entities(representations: $representations) {
              __typename
              ... on AcctAvail {
                clientId
                suffix
                acctId
              }
            }
          }';
      const res = await app.inject({
        method: 'POST',
        url: '/graphql',
        body: {
          query,
          variables,
        },
        headers: {
          'gql-auth': JSON.stringify({
            roles: ['9999:fail'],
          }),
        },
      });
      const response = JSON.parse(res.body);
      t.equal(response.errors ? response.errors[0] : null, 'User does not have access');
      t.end();
    });
    
    opened by dragonfriend0013 9
  • Tests fail upon a fresh install

    Tests fail upon a fresh install

    Noticed the failing tests when fixing this PR: https://github.com/mercurius-js/auth/pull/73 and found that upon a fresh npm install, some tests fail in the test file: test/introspection-filter-basics.js. One example failure is as follows:

    Screenshot 2022-04-27 at 10 37 56

    No idea indication as to why yet but I suspect a downstream module has updated it's behaviour. Will document findings in this issue before moving to a fix :)

    bug 
    opened by jonnydgreen 6
  • feature: multiple directive

    feature: multiple directive

    It would be great to support multiple directives:

    • @hasRole
    • @hasPermission

    Example:

    type Article {
      id: ID!
      title: String!
      content: String! @hasPermission(resources: ["subscribed"])
    }
    
    type Query {
      listArticles: [Article]!
    }
    
    type Mutation {
      publishArticle(articleId: ID!): Article! @hasRole(role: "editor")
      unpublishArticle(articleId: ID!):Boolean @hasPermission(resources: ["publish","delete"])
    }
    

    Doing so, it should be open to integrating external Identity Management such as:

    enhancement 
    opened by Eomm 3
  • updated code to wrap resolveRefence on type

    updated code to wrap resolveRefence on type

    When dealing with federation, the resolveReference function was not getting wrapped, thus was running even if the auth failed. the field resolvers would still fail, but no need to run field resolvers if type resolveRefence auth check failed

    opened by dragonfriend0013 3
  • Review process and initial plan

    Review process and initial plan

    Hi, thanks again for setting this repo up - really appreciate it! :) I've got a fair bit of boilerplate code to push up so we should have everything required straight away and I have also made a start on the core functionality. Before I commit anything to the repo, I just wanted to double check what your preference is regarding the commit + review process for a pre-release repo like this?

    Here's my initial plan in chronological order to get the first release ready:

    • Get plumbing code in (it's pretty much ready to go now)
    • Core functionality for the auth plugin with 100% test coverage
    • Examples
    • Documentation
    • Typings
    • Release package
    question 
    opened by jonnydgreen 3
  • Bump mercurius from 8.12.0 to 9.1.0

    Bump mercurius from 8.12.0 to 9.1.0

    Bumps mercurius from 8.12.0 to 9.1.0.

    Release notes

    Sourced from mercurius's releases.

    v9.1.0

    What's Changed

    New Contributors

    Full Changelog: https://github.com/mercurius-js/mercurius/compare/v9.0.0...v9.1.0

    v9.0.0

    What's Changed

    New Contributors

    Full Changelog: https://github.com/mercurius-js/mercurius/compare/v8.12.0...v9.0.0

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies javascript 
    opened by dependabot[bot] 2
  • feature: filtered schema

    feature: filtered schema

    Right now, setting the directive schema as following, it returns the information to all the clients:

    directive @auth(
      requires: Role = ADMIN,
    ) on OBJECT | FIELD_DEFINITION
    
    enum Role {
      ADMIN
      REVIEWER
      USER
      UNKNOWN
    }
    
    type Query {
      add(x: Int, y: Int): Int @auth(requires: ADMIN) 
    }
    

    Then running the query:

    {
      __schema {
        queryType {
          fields {
            name
          }
        }
      }
    }
    

    Returns the meta-fields

    {
      "data": {
        "__schema": {
          "queryType": {
            "fields": [
              {
                "name": "add"
              }
            ]
          }
        }
      }
    }
    

    Hasura applies a different technique: it returns only the schema that applies its rules.

    So, using this logic to the @auth directive, we could filter the returned GraphQL schema. The user's client will see only those query and field it should see.

    This requires that the user adds to the client additional information (such as an auth token) to get access to all the GraphQL Schema and documentation.

    enhancement 
    opened by Eomm 2
  • Bump @sinonjs/fake-timers from 9.1.2 to 10.0.2

    Bump @sinonjs/fake-timers from 9.1.2 to 10.0.2

    Bumps @sinonjs/fake-timers from 9.1.2 to 10.0.2.

    Changelog

    Sourced from @​sinonjs/fake-timers's changelog.

    10.0.2 / 2022-12-15

    • Revert change to lock file. Back on v2

    10.0.1 / 2022-12-15

    • fix: requestAnimationFrame args (#458)
    • chore: remove fsevents dependency (#455)
    • Upgrade dependencies (#440)
    • fix(runToLastAsync): tick the correct amount of time
    • Fix #441: update spelling of prop descriptor prop (#453)

    10.0.0 / 2022-11-08

    • Prefer @​sinonjs/commons@​2
    • Drop node 12 (#428)
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies javascript 
    opened by dependabot[bot] 0
  • Improving the documentation

    Improving the documentation

    We should take a look at the Mercurius Auth documentation to make sure it is super clear for new and existing users. We should also make sure it provides everything a developer needs to use and understand Mercurius Auth (without having to look closer at the underlying code/tests for example). Before starting an implementation, it would be great to understand the following:

    • Does the docs structure make sense? What could be improved?
    • Is the README sufficient? Is it missing any key information?
    • Do we want a best practices/examples section?
    • Anything else that is missing or think should be included?

    Keen to hear everyone's thoughts on this!

    documentation good first issue 
    opened by jonnydgreen 5
Releases(v3.0.0)
  • v3.0.0(Jul 6, 2022)

    What's Changed

    • Bump tsd from 0.20.0 to 0.21.0 by @dependabot in https://github.com/mercurius-js/auth/pull/80
    • Bump @types/node from 17.0.45 to 18.0.0 by @dependabot in https://github.com/mercurius-js/auth/pull/83
    • Bump tsd from 0.21.0 to 0.22.0 by @dependabot in https://github.com/mercurius-js/auth/pull/86
    • Upgrade Fastify to v4 by @jonnydgreen in https://github.com/mercurius-js/auth/pull/88

    Full Changelog: https://github.com/mercurius-js/auth/compare/v2.0.2...v3.0.0

    Source code(tar.gz)
    Source code(zip)
  • v2.0.2(May 24, 2022)

    What's Changed

    • Bump @fastify/error from 2.0.0 to 3.0.0 by @dependabot in https://github.com/mercurius-js/auth/pull/79
    • Remove @graphql-tools/wrap dependency and replace functionality by @jonnydgreen in https://github.com/mercurius-js/auth/pull/78

    Full Changelog: https://github.com/mercurius-js/auth/compare/v2.0.1...v2.0.2

    Source code(tar.gz)
    Source code(zip)
  • v2.0.1(May 3, 2022)

    What's Changed

    • Bump @sinonjs/fake-timers from 8.1.0 to 9.0.0 by @dependabot in https://github.com/mercurius-js/auth/pull/65
    • Bump fastify-error from 0.3.1 to 1.0.0 by @dependabot in https://github.com/mercurius-js/auth/pull/66
    • Bump actions/setup-node from 2 to 3.0.0 by @dependabot in https://github.com/mercurius-js/auth/pull/67
    • Bump actions/checkout from 2 to 3 by @dependabot in https://github.com/mercurius-js/auth/pull/68
    • Bump tap from 15.2.3 to 16.0.0 by @dependabot in https://github.com/mercurius-js/auth/pull/69
    • build: reduce dependabot update frequency by @Fdawgs in https://github.com/mercurius-js/auth/pull/70
    • Bump actions/setup-node from 3.0.0 to 3.1.0 by @dependabot in https://github.com/mercurius-js/auth/pull/71
    • Bump tsd from 0.19.1 to 0.20.0 by @dependabot in https://github.com/mercurius-js/auth/pull/72
    • build(deps): migrate to @fastify/error by @Fdawgs in https://github.com/mercurius-js/auth/pull/75
    • Pin @graphql-tools/wrap version to resolve introspection query filter issues by @jonnydgreen in https://github.com/mercurius-js/auth/pull/77
    • Bump standard from 16.0.4 to 17.0.0 by @dependabot in https://github.com/mercurius-js/auth/pull/73
    • Bump actions/setup-node from 3.1.0 to 3.1.1 by @dependabot in https://github.com/mercurius-js/auth/pull/76

    Full Changelog: https://github.com/mercurius-js/auth/compare/v2.0.0...v2.0.1

    Source code(tar.gz)
    Source code(zip)
  • v2.0.0(Jan 5, 2022)

    What's Changed

    • Bump fastify/github-action-merge-dependabot from 2.7.0 to 2.7.1 by @dependabot in https://github.com/mercurius-js/auth/pull/56
    • Bump @types/node from 16.11.14 to 17.0.0 by @dependabot in https://github.com/mercurius-js/auth/pull/58
    • Upgrade automerge to v3 by @sameer-coder in https://github.com/mercurius-js/auth/pull/61
    • Bump concurrently from 6.5.1 to 7.0.0 by @dependabot in https://github.com/mercurius-js/auth/pull/63
    • perf: update graphql and mercurius by @TomasTM in https://github.com/mercurius-js/auth/pull/64

    New Contributors

    • @sameer-coder made their first contribution in https://github.com/mercurius-js/auth/pull/61
    • @TomasTM made their first contribution in https://github.com/mercurius-js/auth/pull/64

    Full Changelog: https://github.com/mercurius-js/auth/compare/v1.5.0...v2.0.0

    Source code(tar.gz)
    Source code(zip)
  • v1.5.0(Dec 3, 2021)

    What's Changed

    • Bump actions/setup-node from 2.4.1 to 2.5.0 by @dependabot in https://github.com/mercurius-js/auth/pull/51
    • build(dependabot): ignore minor and patch github-actions updates by @Fdawgs in https://github.com/mercurius-js/auth/pull/47
    • Bump fastify/github-action-merge-dependabot from 2.6.0 to 2.7.0 by @dependabot in https://github.com/mercurius-js/auth/pull/52
    • feat: support repeatable directive by @gdorsi in https://github.com/mercurius-js/auth/pull/53

    New Contributors

    • @Fdawgs made their first contribution in https://github.com/mercurius-js/auth/pull/47
    • @gdorsi made their first contribution in https://github.com/mercurius-js/auth/pull/53

    Full Changelog: https://github.com/mercurius-js/auth/compare/v1.4.0...v1.5.0

    Source code(tar.gz)
    Source code(zip)
  • v1.4.0(Nov 24, 2021)

    What's Changed

    • Bump fastify/github-action-merge-dependabot from 2.5.0 to 2.6.0 by @dependabot in https://github.com/mercurius-js/auth/pull/48
    • Bump tsd from 0.18.0 to 0.19.0 by @dependabot in https://github.com/mercurius-js/auth/pull/49
    • feat: filtered introspection queries by @Eomm in https://github.com/mercurius-js/auth/pull/46

    Full Changelog: https://github.com/mercurius-js/auth/compare/v1.3.1...v1.4.0

    Source code(tar.gz)
    Source code(zip)
  • v1.3.1(Nov 8, 2021)

    What's Changed

    • Bump actions/checkout from 2.3.5 to 2.4.0 by @dependabot in https://github.com/mercurius-js/auth/pull/40
    • typo by @Eomm in https://github.com/mercurius-js/auth/pull/39
    • Bump @typescript-eslint/eslint-plugin from 4.33.0 to 5.3.1 by @dependabot in https://github.com/mercurius-js/auth/pull/45
    • fix multiple authcontext directive by @Eomm in https://github.com/mercurius-js/auth/pull/44

    New Contributors

    • @Eomm made their first contribution in https://github.com/mercurius-js/auth/pull/39

    Full Changelog: https://github.com/mercurius-js/auth/compare/v1.3.0...v1.3.1

    Source code(tar.gz)
    Source code(zip)
  • v1.3.0(Oct 20, 2021)

    What's Changed

    • Added statusCode information on errors' doc by @artecoop in https://github.com/mercurius-js/auth/pull/33
    • Bump tsd from 0.17.0 to 0.18.0 by @dependabot in https://github.com/mercurius-js/auth/pull/35
    • Bump actions/checkout from 2.3.4 to 2.3.5 by @dependabot in https://github.com/mercurius-js/auth/pull/36
    • Add external policy mode by @jonnydgreen in https://github.com/mercurius-js/auth/pull/37

    New Contributors

    • @artecoop made their first contribution in https://github.com/mercurius-js/auth/pull/33

    Full Changelog: https://github.com/mercurius-js/auth/compare/v1.2.1...v1.3.0

    Source code(tar.gz)
    Source code(zip)
  • v1.2.1(Sep 28, 2021)

  • v1.2.0(Sep 14, 2021)

  • v1.1.0(May 13, 2021)

  • v1.0.0(Apr 27, 2021)

Owner
null
Auth model created by Using nodeJs for backend & reactJs for frontend with the help of TailwindCss in styling

The Universal Auth System Using The MERN Stack Including Mysql --> The project is divded to two separte projects 1- The Client side -> containing the

m.bebars 1 Aug 22, 2022
A starter template for Nest.js with MongoDB, GraphQL, JWT Auth, and more!

A progressive Node.js framework for building efficient and scalable server-side applications. Description Nest framework TypeScript starter repository

Michael Guay 19 Dec 25, 2022
Connect to private Google Cloud SQL instance through Cloud SQL Auth Proxy running in Kubernetes.

⛅ google-cloud-sql A CLI app which establishes a connection to a private Google Cloud SQL instance and port-forwards it to a local machine. Connection

Dinko Osrecki 10 Oct 16, 2022
Zotero plugin for syncing items into a Notion database

Notero A Zotero plugin that syncs items into a Notion database when added to a specific collection. Scaffolded with generator-zotero-plugin and built

David Vanoni 991 Jan 9, 2023
graphql-codegen plugin to generate type-safe, easy-to use hooks for Flutter

graphql-codegen-flutter-artemis-hooks This is graphql-codegen plugin to generate type-safe, easy-to use Flutter artemis hooks. For further detail, see

seya 18 Jan 2, 2023
Fastify is a web framework highly focused on providing the best developer experience with the least overhead and a powerful plugin architecture, inspired by Hapi and Express.

Fastify is a web framework highly focused on providing the best developer experience with the least overhead and a powerful plugin architecture, inspired by Hapi and Express.

Jared Hanson 5 Oct 11, 2022
A postgraphile plugin that allows you to expose only a single direction of connections exposed by foreign key constraints

A postgraphile plugin that allows you to expose only a single direction of connections exposed by foreign key constraints

Chandler Gonzales 4 Mar 13, 2022
just a graphql example created by typescript + fastify + mikro-orm(postgresql) + mercurius(graphql adaptor) + type-graphql

fastify-mikro-orm-mercurius-graphql-example A MikroORM boilerplate for GraphQL made with Fastify, Mercurius, Typescript using TypeGraphQL ?? Packages

Vigen 10 Aug 28, 2022
Auth-Form-Design - Beautiful Auth Form Designed using React 🥰.

?? Auth Form Design ?? Features 1. Check Your Password Strength 2. Can Use Suggested Password 3. Enjoy Responsive Design Getting Started with Create R

Samarpan Dasgupta 2 Dec 24, 2022
Source code for the deprecated expo-google-app-auth package. Deprecated in favor of expo-auth-session.

expo-google-app-auth Source code for the deprecated expo-google-app-auth package. Expo Google App Auth API wrapped the deprecated expo-app-auth packag

Expo 4 Nov 2, 2022
Firebase adepter auth process with custom token example in Next Auth

Firebase adepter auth process with custom token example in Next Auth Example of a firebase adapter that works with firebase authentication. A firebase

Low Front 10 Oct 14, 2022
Remix Auth plugin for Twitter OAuth 1.0a

Remix Auth Twitter Remix Auth plugin for Twitter OAuth 1.0a. Supported runtimes Runtime Has Support Node.js ✅ Cloudflare ✅ Demo Try out live demo (sou

na2hiro 13 Dec 31, 2022
node.js auth package (password, facebook, & more) for Connect and Express apps

everyauth Authentication and authorization (password, facebook, & more) for your node.js Connect and Express apps. There is a NodeTuts screencast of e

Brian Noguchi 3.5k Dec 17, 2022
A Two-Factor Auth Client

A Two-Factor Auth Client Tired of having to pull out your phone all the time to grab those 2fa codes? Install: npm install -g tfa Getting Help bash-3.

James M Snell 30 Dec 28, 2022
NPM Package that simplifies Auth with Google OAuth2 🔐

Node Google OAuth2 ?? A simple authentication flow for Google OAuth2 Explore the docs » Report Bug Table of Contents About The Project Getting Started

Adarsh C 8 Jun 17, 2022
Starter Antd 4.0 Admin App Mern( Node.js / React / Redux / Ant Design ) Crud & Auth , Dashboard

Starter Antd Admin (Crud & auth) Mern App (Express.js / React / Redux / MongoDB) App built for DigitalOcean MongoDB Hackathon CRM Starter Mern Antd Ad

Salah Eddine Lalami 208 Jan 8, 2023
Disney+ clone with React + Redux + Firebase auth and Firestore

Disney+ (Disney+ Clone) Test it out: Disney+ Disney+_720p.mov Description Beautiful Disney+ clone built with React.js and styled components. Managed R

Sudhanshu Kumar 4 Apr 18, 2022
Auth model created by Using nodeJs for backend & reactJs for frontend with the help of TailwindCss in styling

The Universal Auth System Using The MERN Stack Including Mysql --> The project is divded to two separte projects 1- The Client side -> containing the

m.bebars 1 Aug 22, 2022
An unofficial, simplified version of the @Shopify/koa-shopify-auth middleware library.

simple-koa-shopify-auth https://www.npmjs.com/package/simple-koa-shopify-auth NOTE: This package is not maintained by or affiliated with Shopify. Desc

David 20 Nov 7, 2022
A Remix Auth strategy for working with forms.

FormStrategy A Remix Auth strategy to work with any form. Supported runtimes Runtime Has Support Node.js ✅ Cloudflare ✅ How to use This Strategy gives

Sergio Xalambrí 40 Jan 2, 2023