Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SDK-2542] Expose methods from Auth0 SPA SDK #150

Merged
merged 10 commits into from
May 6, 2021

Conversation

stevehobbsdev
Copy link
Contributor

@stevehobbsdev stevehobbsdev commented May 5, 2021

This PR exposes the following methods from Auth0 SPA SDK so that the SDK can be used
in the context of an Ionic + Capacitor app, where calling this manually is
necessary in order to be able to handle the callback at the right time:

  • handleRedirectCallback
  • buildAuthorizeUrl
  • buildLogoutUrl

Added unit tests for each.

@stevehobbsdev stevehobbsdev requested a review from a team as a code owner May 5, 2021 11:39
@stevehobbsdev stevehobbsdev added CH: Added PR is adding feature or functionality review:small Small review labels May 5, 2021
frederikprijck
frederikprijck previously approved these changes May 5, 2021
Copy link
Member

@frederikprijck frederikprijck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but added one comment.

projects/auth0-angular/src/lib/auth.service.spec.ts Outdated Show resolved Hide resolved
@stevehobbsdev stevehobbsdev force-pushed the feat/expose-handleredirect branch from fe9c302 to 7390e37 Compare May 5, 2021 14:51
@stevehobbsdev stevehobbsdev enabled auto-merge (squash) May 5, 2021 14:53
@stevehobbsdev stevehobbsdev disabled auto-merge May 5, 2021 14:53
@stevehobbsdev stevehobbsdev marked this pull request as draft May 5, 2021 14:57
@stevehobbsdev stevehobbsdev changed the title [SDK-2542] Expose handleRedirectCallback [SDK-2542] Expose methods from Auth0 SPA SDK May 5, 2021
@stevehobbsdev stevehobbsdev marked this pull request as ready for review May 5, 2021 15:25
@ljmcadenas
Copy link

Hi there.
It'd be amazing to have these methods exposed. Is there any estimated date to release this once merged?

Thanks!

@frederikprijck
Copy link
Member

@ljmcadenas That shouldn't take too long, hopefully end of this week or early next week.

Out of curiosity, may I ask what is your use case for looking forward to these changes?

@frederikprijck frederikprijck merged commit 2117a23 into master May 6, 2021
@frederikprijck frederikprijck deleted the feat/expose-handleredirect branch May 6, 2021 07:04
@frederikprijck frederikprijck added this to the vNext milestone May 6, 2021
@ljmcadenas
Copy link

@frederikprijck , sure.
So, we are logging in the user in a web app. At some point in the time, we need to launch a desktop app from the web. We don't want the user to go through the login flow again if it's already authenticated on the web. So, we are trying to get a new authorization code by calling the authorize endpoint from the browser (In an iframe and taking advantage it has all auth0 cookies set up) and passing it to the desktop app so it can ask for a new token to be used there.

However, I found out this method buildAuthorizeUrl does more things I'm not interested in. Like creating a new transaction in the transaction manager. So I might end up building the URL manually.

Any better idea you might have would be much appreciated :)

@nonsenseless
Copy link

@frederikprijck @stevehobbsdev Sorry to bother you but what exactly is the workflow for using these methods supposed to look like? It's not entirely obvious from the documentation.

@frederikprijck
Copy link
Member

@nonsenseless If you are talking about in the context of Ionic, we are working on some guidance that should be available soon. If you are talking about in the context of Angular, outside of Ionic, you shouldn't realy need these methods.

@nonsenseless
Copy link

@frederikprijck I meant specifically in the context of ionic 5 and capacitor; from the GitHub history it looks like this is something y'all are aware of and talking over but I'd definitely appreciate getting a better sense of how y'all anticipate these being used.

@nonsenseless
Copy link

@frederikprijck Actually, I may have finally slotted all the pieces together. I'll try to prepare a write-up of what was useful in my case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CH: Added PR is adding feature or functionality review:small Small review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants