I'm currently working on a project where we're using PnP Core on the backend to interact with SharePoint Online. However, we need to use a custom OAuth flow on the front end to authenticate users and retrieve tokens for use with PnP Core. Additionally, we have a requirement to store refresh tokens for offline use.
I'm wondering if anyone has experience using a custom authentication provider with PnP Core in this way, and could provide some guidance or examples. Specifically, I'm looking to pass the token from the front end to the back end for use with PnP Core's authentication, and then store the refresh token for offline use.
Any help or resources would be greatly appreciated! Thanks in advance.
I've tried hardcoding the access token on the GetAccessTokenAsync method (following this link: SharePoint Rest API how to get Access Token?), but it fails while making a graph service request.