blockstack-browser
blockstack-browser copied to clipboard
Collections: Handle collection scopes in auth flow
Goal
The browser should be able to handle auth requests with collection scopes.
An auth request from the client-side app looks like this:
import { Collections } from 'blockstack'
const { Contact, Document } = Collections
const collectionScopes = [
Contact.scope.read,
Document.scope.write
]
const appConfig = new AppConfig(
[...DEFAULT_SCOPE.slice(), collectionScopes], // scopes
'http://localhost:3000', // appDomain
window.location.origin, // redirectPath
'/manifest.json', // manifestPath
null, // coreNode
DEFAULT_BLOCKSTACK_HOST // authenticatorURL
)
const userSession = new UserSession(appConfig)
userSession.redirectToSignIn()
Currently, adding unknown scopes to the auth request breaks the login flow. The browser stays idling in "signing in ..." state.
There is no feedback and no console message.
This affects following apps in that users can't sign-in anymore: gitix (@friedger ), webby (@dantrevino )
@friedger I'm able to log into both apps. Is this dependent on the version of blockstack browser that you're using?