blockstack-browser icon indicating copy to clipboard operation
blockstack-browser copied to clipboard

Collections: Handle collection scopes in auth flow

Open yknl opened this issue 6 years ago • 2 comments

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()

yknl avatar Mar 27 '19 13:03 yknl

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 avatar Nov 09 '19 08:11 friedger

@friedger I'm able to log into both apps. Is this dependent on the version of blockstack browser that you're using?

dantrevino avatar Nov 11 '19 18:11 dantrevino