diff --git a/pyramid_multiauth/__init__.py b/pyramid_multiauth/__init__.py
index <HASH>..<HASH> 100644
--- a/pyramid_multiauth/__init__.py
+++ b/pyramid_multiauth/__init__.py
@@ -261,9 +261,19 @@ def policy_factory_from_module(config, module):
     # Find the most recent IAuthenticationPolicy action, and grab
     # out the registering function so we can call it ourselves.
     for action in reversed(config.action_state.actions):
-        if action[0] is not IAuthenticationPolicy:
+        # Extract the discriminator and callable.  This is complicated by
+        # Pyramid 1.3 changing action from a tuple to a dict.
+        try:
+            discriminator = action["discriminator"]
+            callable = action["callable"]
+        except TypeError:              # pragma: nocover
+            discriminator = action[0]  # pragma: nocover
+            callable = action[1]       # pragma: nocover
+        # If it's not setting the authn policy, keep looking.
+        if discriminator is not IAuthenticationPolicy:
             continue
-        def grab_policy(register=action[1]):  # NOQA
+        # Otherwise, wrap it up so we can extract the registered object.
+        def grab_policy(register=callable):  # NOQA
             old_policy = config.registry.queryUtility(IAuthenticationPolicy)
             register()
             new_policy = config.registry.queryUtility(IAuthenticationPolicy)
Compatability with Pyramid <I>.

Pyramid <I> changes the API of the internal ActionState object, which
pyramid_multiauth uses for deep introspection.  This patch tries the
<I> API first and falls back to the previous API if that fails.