GithubHelp home page GithubHelp logo

Comments (3)

daffl avatar daffl commented on May 22, 2024 1

The hook is a good idea. Once we finalize the next version of Feathers authentication we'll make sure to document how it should work with all official database adapters.

from feathers-knex.

KNTH01 avatar KNTH01 commented on May 22, 2024

Hello,

I have got an idea while sleeping, then I try it:

'use strict'

// src/services/user/hooks/google-auth.js
//
// Use this hook to manipulate incoming or outgoing data.
// For more information on hooks see: http://docs.feathersjs.com/hooks/readme.html

const defaults = {}

module.exports = function (options) {
  options = Object.assign({}, defaults, options)

  return function (hook) {
    if (hook.data.google) {
      // convert JSON object to string
      hook.data.google = JSON.stringify(hook.data.google)
    }
  }
}

This hook (before) for my user service solves my problem.

I let this issue opened, I think there is action to do here, a new comer to FeathersJS shall not have to debug his app. At least giving the users schema table? Any other suggestion?

Thanks.

from feathers-knex.

daffl avatar daffl commented on May 22, 2024

We have some pretty big changes coming in feathersjs-ecosystem/authentication#336 that will allow to customize the response. I am going to close this issue since we are now keeping track of the changes necessary for this in the feathers-authentication repository.

from feathers-knex.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.