Clever Instant Login - Redirect URIs

171 views
Skip to first unread message

Shafique Arnab

unread,
Oct 23, 2015, 9:05:10 AM10/23/15
to Clever Developer Program: Discussions
Hello,

We're in the process of building a multi-tenant application, i.e. https://clientName.baseHost.com. In this manner, every client also needs a unique redirect URI (https://clientName.baseHost.com/login/external/clever).

However, from our initial testing (and according to the documentation), the behavior is that Clever will always redirect the user to the first URI provided on the application settings panel, regardless of the URI sent along with the Login request.

What then, is the point of listing multiple URIs? Additionally, is there any way to circumvent this issue outside of creating a standalone, common login endpoint? It would make sense that if multiple URIs can be provided, then Login should redirect to the URI matching the one sent in the request.

Best,
Shafique Arnab 

Taylor Singletary

unread,
Oct 23, 2015, 11:14:34 AM10/23/15
to Clever Developer Program: Discussions, shafiq...@gmail.com
Hi Shafique,

You're right, that in the context of a district's Instant Login portal, we'll only ever send the user to the first redirect URI on file. At this time, we don't have a way to map districts to specific redirect URIs you may have pre-registered for Clever.

Using "Log in with Clever" buttons, you can specify any of your registered redirect URIs -- so if the only way to log in to your application were by way of your own website, you'd be able to control that experience from district-specific landing pages. But Clever customers generally enjoy signing in to apps from their common dashboard.

Most developers in your scenario build a common handler at their primary redirect. After exchanging the code for a bearer token, it is trivial to determine the Clever ID for the district, which you can then compare to your own mapping and perform another redirect to your subdomain of choice for that district. That's the approach I would most strongly recommend.

Best,
Taylor Singletary
Clever developer relations

jta...@gmail.com

unread,
Oct 23, 2015, 8:07:55 PM10/23/15
to Clever Developer Program: Discussions, shafiq...@gmail.com
Is there support for wildcards or pattern matching in the URL?

We're trying to integrate with a similar setup to the original poster. I'd like to be able to make the first URL a generic "Sorry, you must go to your school page" with instructions URL, second one be a pattern to match any possible subdomain.

It doesn't make sense to have to append to the list (what's the max size?) every time we sign a customer.

Thanks,
Jeff

Taylor Singletary

unread,
Oct 26, 2015, 10:27:58 AM10/26/15
to Clever Developer Program: Discussions, shafiq...@gmail.com, jta...@gmail.com
Hi Jeff,

There is unfortunately no support for any kind of globbing, wildcard, or pattern matching in the URL -- we'll only send users to exact matches of the URLs you provide. Currently there's no explicit maximum on the number of URIs you can register, due to the underlying storage format we use.

Instead of registering a separate URI for each of your customers, we would strongly encourage you to maintain a mapping of Clever district IDs and your corresponding subdomain or district-specific URI and perform a follow-on redirect once Clever has passed you that information -- that would give you the greatest amount of control in all possible scenarios -- whether users were arriving directly to your site, or from Clever Instant Login, or if there were other tricky things you wanted to try, like detecting whether the user should be redirected to a custom URI scheme.

Taylor Singletary
Clever developer relations
Reply all
Reply to author
Forward
0 new messages