GithubHelp home page GithubHelp logo

Comments (4)

nsarno avatar nsarno commented on August 27, 2024 2

No it's not needed! You also don't need to run the token_controller generator.

from knock.

nsarno avatar nsarno commented on August 27, 2024 1

Do I need to have the same 'secret' on both servers?

Yes. If you want to be able to decode a token generated by your auth server, you need to share a secret signature key.

This is the default configuration with Knock (see the initializer), you can change it to be anything you want.

 config.token_secret_signature_key = -> { Rails.application.secrets.secret_key_base }

I assume Knock would be running on the Auth server

Knock is conceived to act as both the API and the Auth Server. But you can also use it on both sides separately!

Here's an example of how to setup knock with Auth0 and a Rails API backend (that would be the Data API for you). In this case, Auth0 provides authentication as a service, so you don't need to care about implementing the Auth Server.

Hope this helps!

from knock.

andyrue avatar andyrue commented on August 27, 2024

Do you still need a User model that responds to authenticate on the API Backend or is that only if you don't use an external authentication source? I wasn't planning on having a User database on the backend, only passing group information in the JWT to determine specific access.

from knock.

andyrue avatar andyrue commented on August 27, 2024

Great, thanks for your help!

from knock.

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.