Comments (5)
@deontologician - if it's possible to write up a paragraph or so about how to use this, it'd be really helpful. (cc @Tryneus)
from horizon-docs.
Hmm, this is actually kinda crappy at the moment. I'm not sure we should document this until rethinkdb/horizon#429 is completed, since otherwise you need to use an internal api I'd rather not suggest in the docs.
I'm going to open another issue in the horizon repo to get some input on how exactly we should get this flow to work, since it's not obvious
from horizon-docs.
Ok, so now we have rethinkdb/horizon#429 published, so it's ok to talk about it.
Basic process:
- With your admin user, do a
horizon('users').store({ id: <SOME_USER_ID> })
- Now, go to the command line, use
hz make-token <SOME_USER_ID>
possibly passing connect options to make-token - Copy the token that is printed out on the commandline
- Pass that token to your next creation of a Horizon object:
var horizon = Horizon({ authType: { token: <TOKEN_HERE>, storeLocally: true/false }})
token is the user token to log in as
storeLocally is whether horizon should try to preserve the token in localStorage so you don't have to pass it the next time you want to log in
from horizon-docs.
With your admin user [...]
We'll need to explain that step too (it works as Josh described, just without step 1 and with admin
instead of <SOME_USER_ID>
in step 2 as far as I know).
from horizon-docs.
Having to document this is really pointing out how terrible this process is
from horizon-docs.
Related Issues (20)
- Upgrade docker-compose files to v2 of the docker-compose file spec HOT 8
- Document integration with specific frameworks (React etc.) HOT 2
- Users doc misleading
- cookbook entry: subscribing to changing data
- Horizon 2.0 docs checklist HOT 27
- Document `Collection.update`, `Collection.insert` and correct existing write commands
- Clarify client constructor host option
- .filter() listed twice in Observable's methods. HOT 1
- We need a guide on "Deploying Horizon"
- New page about Horizon client packaging HOT 2
- Section headers should be clickable to put the fragment in the URL path
- Document admin user requirement
- Permissions only mentions `.find` once but it isn't clear if using `.findAll` covers `.find`? HOT 2
- Auth documentation needs to show boilerplate on how to handle connections by unauth'd and auth'd users
- Embedding docs incorrectly uses `_reql_conn` as a property of the server module HOT 2
- Document how to use JWT generated using CLI
- horizon js can not access rethinkdb in port 28025 without --dev flag . Error : action not permitted .
- Docs at http://horizon.io/docs/auth/ don't say what callback URL to use HOT 8
- Include section in FAQ on why full ReQL queries aren't supported in Horizon
- Document .aggregate and .model HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from horizon-docs.