Cannot sign in user

#1
  1. Is something wrong with the appConfig?

      const appConfig = new blockstack`.AppConfig(["store_write", "publish_data"])
    
      appConfig.redirectURI = () => "home.html";
    
      var userSession = new blockstack.UserSession({
       appConfig,
      });
    
     function signOut() {
       // We pass url to redirect after signing out
       blockstack.signUserOut('index.html');
     }
    

I imported the file with this JS into each html page so it can be accessed.

  1. Also, how would you define the appDomain? I tried

     AppConfig {
       
       appDomain: "AppName",
    
       
       scopes: ["store_write", "publish_data"],
    
    
       
       redirectPath: "home.html",
    
       }
    

but got errors.

#2

Could you show me the error log?

const appConfig = new blockstack`.AppConfig(["store_write", "publish_data"])

I see there is an extra char behind blockstack. I don’t know if it is your problem:sweat_smile:

1 Like
#3

Thanks Gavin!