Stacks.js: Update READMEs to use @stacks/connect instead of @stacks/auth

Created on 10 Feb 2021  路  7Comments  路  Source: blockstack/stacks.js

Developers are currently misled into thinking that they should install the auth package instead of connect for most web app purposes.

The storage README, for example:

image

Impacts DOCS P3

Most helpful comment

I'd prefer someone from Tintash to take it. This sounds like one should use the code, try to run it, update as necessary (input here would be helpful from an eng like @kyranjamie), and update the README. Probably a good first issue

All 7 comments

@markmhx @kyranjamie is this still relevant? we could ask Tintash to help with this I assume? Any guidance you could provide?

I assume it's still relevant, though it's also just a README / documentation update (in this repository, vs. the docs one) so perhaps @pgray-hiro could take it?

I'd prefer someone from Tintash to take it. This sounds like one should use the code, try to run it, update as necessary (input here would be helpful from an eng like @kyranjamie), and update the README. Probably a good first issue

I'm inclined to say this isn't relevant. I wouldn't imagine @stacks/storage docs should show connect code examples. Perhaps we can just add a one-liner with a link mentioning connect?

okay, I'm closing this for now. can revisit later if it comes up again.

IIRC the code snippet in the storage README doesn't work 鈥撀爋r at least we don't recommend users do this (import auth instead of connect):

import { UserSession } from '@stacks/auth';
import { Storage } from '@stacks/storage';

const appConfig = new AppConfig();
const userSession = new UserSession({ appConfig });
const storage = new Storage({ userSession });

Can we just remove this README content in general and link to the storage guide?

https://docs.stacks.co/build-apps/guides/data-storage

image

We also don't recommend what's being shown in the auth package README itself anymore: https://github.com/blockstack/stacks.js/tree/master/packages/auth#generating-an-authentication-request

image

See the authentication guide here for example: https://docs.stacks.co/build-apps/guides/authentication#initiate-usersession-object

The original idea here was simply to iron out these discrepancies, since they do tend to turn new developers around when getting their feet wet. I'm all for just directing README users to the docs if that simplifies things.

@markmhx thanks for the details! let's keep this one and iron out the discrepancies you describe

Was this page helpful?
0 / 5 - 0 ratings

Related issues

larrysalibra picture larrysalibra  路  6Comments

timstackblock picture timstackblock  路  6Comments

jefreybulla picture jefreybulla  路  5Comments

muneebm picture muneebm  路  5Comments

rikur picture rikur  路  8Comments