Question about handleIncomingRedirect

Hello, I was going through the solid-client-authn-browser API.
And in the description of handleIncomingRedirect function, the types that this function accepts as inputOptions are: string | IHandleIncomingRedirectOptions. So I have two questions:

  1. What happens with the input options passed
  2. What is this IHandleIncomingRedirectOptions, where can I find some info about it?
    I guess that things like:
    restorePreviousSession: true
    useEssSession: false

Would be of this type, but I want to find some more info.
Thank you in advance

Hi,

here is the part in the inrupt docs about session restore:

https://docs.inrupt.com/developer-tools/javascript/client-libraries/tutorial/restore-session-browser-refresh/?highlight=onsessionrestore#enable-session-restore

Details about IHandleIncomingRedirectOptions can be found directly in the source code (I do not know why those comments are not part of the rendered API docs on the inrupt site):

1 Like

@aveltens interesting, thanks for pointing that out! We are currently working on fixing some issues with out API docs, I’m adding this to the list. And also, thanks for your response, which is completely on point.

Just some additional precisions: note that the options may all be omitted, resulting in the current browser location being used as the input URL. And @Greetings you’re right, { restorePreviousSession: true } is typically what you’d pass as an option. When set to true, the library tries to automatically log the user back in after the page has been reloaded or refreshed. The operation succeeds if there is still an active cookie on the Identity Provider.

The useEssSession option has recently been deprecated, and should no longer be used.

1 Like

@aveltens, @zwifi thank you very much for your help, your replies solved my question.

2 Likes