Skip to content

onSession does not work with popup workflow #23

@josephguillaume

Description

@josephguillaume

The "session" event is emitted by handleRedirect, which is never called in the main window with the popup workflow. The callback provided to onSession is therefore never called.

https://github.com/solid/solid-auth-fetcher/blob/877dd07e8a0ecd00121414b21d1aeffbb72660d0/src/AuthFetcher.ts#L121

One option would be to emit a "session" event after the session is created in PopUpLoginHandler
https://github.com/solid/solid-auth-fetcher/blob/877dd07e8a0ecd00121414b21d1aeffbb72660d0/src/login/popUp/PopUpLoginHandler.ts#L73

As a workaround, when using the popup workflow, the onSession callback can be called on completion of login, e.g.

solidAuthFetcher.login({
      oidcIssuer: "https://identityProvider.com",
      popUp: true,
      popUpRedirectPath: "/popup.html"
    }).then( session => console.log(session.webId)  )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions