~tsileo/blobstash

be141192401a2cb6f381f377411891193e74ddd5 — Thomas Sileo 3 months ago a07c412
apps: fix IndieAuth
1 files changed, 2 insertions(+), 0 deletions(-)

M pkg/apps/apps.go
M pkg/apps/apps.go => pkg/apps/apps.go +2 -0
@@ 135,6 135,7 @@ func (apps *Apps) newApp(appConf *config.AppConfig, conf *config.Config) (*App, 
	if appConf.IndieAuthEndpoint != "" {
		app.waitForIndieAuth = true
		go func() {
			// Let the server start completely if the IndieAuth server is a BlobStash app
			time.Sleep(10 * time.Second)
			ia, err := indieauth.New(apps.sess.Session(), appConf.IndieAuthEndpoint)
			if err != nil {


@@ 143,6 144,7 @@ func (apps *Apps) newApp(appConf *config.AppConfig, conf *config.Config) (*App, 
			ia.RedirectPath = "/api/apps/" + app.name + "/indieauth-redirect"
			app.auth = ia.Check
			app.ia = ia
			app.waitForIndieAuth = false
			app.log.Info("IndieAuth ready")
		}()
	}