+ var id = iD()
+ .embed(true)
+ .imagePath("/assets/iD/img/")<%# Can't use asset_path('id/img/') in production. %>
+ .preauth({
+ <% token = @user.access_token(ID_KEY) %>
+ url: "<%= request.protocol + request.host_with_port %>",
+ oauth_consumer_key: "<%= token.client_application.key %>",
+ oauth_secret: "<%= token.client_application.secret %>",
+ oauth_token: "<%= token.token %>",
+ oauth_token_secret: "<%= token.secret %>"
+ });